Closed Y1YU closed 2 years ago
I use the jpeg image, it is different from the data type, but I think it doesn't matter.
Well, I find the problem. It's because the order of the classes folders.
Hi Y1YU,
I have the same issue. My ImageNet folder hierarchy as following:
|-imagenet
|-train
| |-n01440764
| | |-ILSVRC2012_val_00000341.JPEG
| | |-ILSVRC2012_val_00009603.JPEG
| | |-...
| |-n01824575
| | |-ILSVRC2012_val_00000341.JPEG
| | |-ILSVRC2012_val_00009603.JPEG
| | |-...
| |-...
|-val
| |-n01440764
| | |-ILSVRC2012_val_00000341.JPEG
| | |-ILSVRC2012_val_00009603.JPEG
| | |-...
| |-n01824575
| | |-ILSVRC2012_val_00000341.JPEG
| | |-ILSVRC2012_val_00009603.JPEG
| | |-...
| |-...
which is different from the hierarchy show in this repo.
Would you please kindly let me know how you solve this issue? Thank you.
Problem solved, I change the imagenet path to 'imagenet/val'. Then I can inference correctly.
I use the pretrained model CvT-13-224x224-IN-1k.pth, and test on Imagenet as the guide, but the result is terrible "TEST: Loss 8.5690 Error@1 98.926% Error@5 97.844% Accuracy@1 1.074% Accuracy@5 2.156%"
Does anyone else have tested? Why is it?