Cannot reproduce ViG imagenet result using provided pretrained weights. Am I doing something wrong?
wanburana opened this issue · comments
I tried to reproduce the result of ViG using provided pretrained weights. I tried to follow the instruction as close as possible With some slight modification of the code to avoid versioning conflict (I tried to use the given torch and timm version, but it always result in some import error)
- import
convert_splitbn_model
fromtimm.layers
instead oftimm.models
- use
ImageDataset
instead ofDataset
The commit different can be seen in here: master...wanburana:Efficient-AI-Backbones:master
I tried 3 models: ViG-S, ViG-B, Pyramid ViG-S
here is the script I use to run the evaluation
python train.py /content/imagenet --model vig_s_224_gelu -b 128 --pretrain_path /content/Efficient-AI-Backbones/vig_pytorch/vig_s_80.6.pth --evaluate
python train.py /content/imagenet --model vig_b_224_gelu -b 128 --pretrain_path /content/Efficient-AI-Backbones/vig_pytorch/vig_b_82.6.pth --evaluate
python train.py /content/imagenet --model pvig_s_224_gelu -b 128 --pretrain_path /content/Efficient-AI-Backbones/vig_pytorch/pvig_s_82.1.pth.tar --evaluate
-
ViG-S
-
ViG-B
-
Pyramid ViG-S
This google colab can be used to reproduce my result:
https://colab.research.google.com/drive/1lwWvx9jR3CKYX_qLPP0VysRMKCZMX6Qw?usp=sharing
Thank you. After I installed the correct dependency, I was able to reproduce the result.