Skip to content

Expose hsv_to_rgb and rgb_to_hsv #8179

Open
@rehno-lindeque

Description

@rehno-lindeque

🚀 The feature

Expose torchvision.transforms.functional.hsv_to_rgb and torchvision.transforms.functional.rgb_to_hsv in the public api.

Motivation, pitch

There is already a private _hsv_to_rgb and _rgb_to_hsv (and the older _hsv2rgb, _rgb2hsv).

I'd like to use hsv_to_rgb directly in my project in order to visualize complex number fields.

Alternatives

There exists matplotlib.colors.hsv_to_rgb, and PIL.Image.Image.convert.

However there are numerous advantages to working directly with the pytorch tensors instead of converting back and forth.

Additional context

This should also help with implementing other custom transforms on top of HSV.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions