Skip to content

Grayscale transformations #6

Open
@adamxyang

Description

@adamxyang

Hi, thanks for the great package. I found affine transformations always turn my Grayscale images into three-channel images. Is there any additional parameters that would prevent this and only output one-channel grayscale images?

I simply used the code in Readme:

train_transform = cvtransforms.Compose([
cvtransforms.RandomAffine(degrees=10, translate=(0.1, 0.1), scale=(0.9, 1.1), shear=(-10, 0)),
cvtransforms.ToTensor()
                ])

ToTensor method preserves dimensions but RandomAffine does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions