Skip to content

Fill colors for tensor affine transforms #2887

Closed
@voldemortX

Description

@voldemortX

🚀 Feature

Support fill color other than 0 for tensor affine transforms (rotate, affine).

Motivation

It is important for pixel-wise tasks (e.g. segmentation) to have different fill color for ignored label (e.g. 255).

Pitch

Different fill colors are supported for tensors like already supported for PIL images in affine transformations.
Specifically, for rotate() and affine() in transforms/functional_tensor.py.

Alternatives

None at the moment.

Additional context

The requested feature was not supported in the recently completed tensor/PIL unification process #2292 probably due to pytorch grid_sampler(), which is what the implementations based on, does not seem to support fill colors other than 0.

@vfdev-5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions