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

Please note the Resize, Crop usage of torchvision.transforms! #67

Open
kmkmkr opened this issue Jun 21, 2024 · 0 comments
Open

Please note the Resize, Crop usage of torchvision.transforms! #67

kmkmkr opened this issue Jun 21, 2024 · 0 comments

Comments

@kmkmkr
Copy link

kmkmkr commented Jun 21, 2024

Differences between Resize and Crop arguments may cause incorrect comparisons between corruption data and clean data.

The label of this image is tench, in the case of this image, method 1 clearly improves the accuracy of the original (severity=0)
In the transformation of the original image, method1 is incorrect

For a correct comparison, I would suggest using method2 .

clean_image_path : val/n01440764/ILSVRC2012_val_00041939.JPEG.png
method1

transforms.Resize((256, 256)),
transforms.CenterCrop((224, 224)),

method2

transforms.Resize(256),
transforms.CenterCrop(224),

method1 result (severity:0->1->2->3->4->5)
Screenshot from 2024-06-21 14-17-41

method2 result(severity:0->1->2->3->4->5)
Screenshot from 2024-06-21 14-18-19

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