Please note the Resize, Crop usage of torchvision.transforms!
Opened this issue · 0 comments
kmkmkr commented
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),