Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transforms gives weird white image #110

Open
harshdhamecha opened this issue Feb 15, 2023 · 0 comments
Open

Transforms gives weird white image #110

harshdhamecha opened this issue Feb 15, 2023 · 0 comments

Comments

@harshdhamecha
Copy link

We have used the following transformations in dataset_loader.py

from src.data_io import transform as trans

def get_train_loader(conf):
    train_transform = trans.Compose([
        trans.ToPILImage(),
        trans.RandomResizedCrop(size=tuple(conf.input_size),
                                scale=(0.9, 1.1)),
        trans.ColorJitter(brightness=0.4,
                          contrast=0.4, saturation=0.4, hue=0.1),
        trans.RandomRotation(10),
        trans.RandomHorizontalFlip(),
        trans.ToTensor()
    ])
    ... # (Just to shorten the code here)
    return train_loader

The resultant images before and after transforms were as follows:

Before

before_2

After

after_2

When we replace the src.data_io's transforms with torchvision's transforms and keeping the transform pipeline same, we get the following results:

Before

before_1

After

after_1

The torchvision's transforms gives desired results in our opinion. Correct us if we are wrong.

Is there anything wrong in our transform pipeline or the author had implemented this transform to improve liveness performance?

Please shed some lights on this!

Issue credit: @vrushank-pambhar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant