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 from timm.layers instead of timm.models
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)
convert_splitbn_model
fromtimm.layers
instead oftimm.models
ImageDataset
instead ofDataset
The commit different can be seen in here: https://github.com/huawei-noah/Efficient-AI-Backbones/compare/master...wanburana:Efficient-AI-Backbones:masterI 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
reproduced ViG-B Top-1: 75.564 %
reported ViG-B Top-1: 82.3 %-
Pyramid ViG-S
This google colab can be used to reproduce my result: https://colab.research.google.com/drive/1lwWvx9jR3CKYX_qLPP0VysRMKCZMX6Qw?usp=sharing