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

[FEATURE] Update HRNet Pretrained Weights #1895

Closed
seefun opened this issue Aug 2, 2023 · 3 comments
Closed

[FEATURE] Update HRNet Pretrained Weights #1895

seefun opened this issue Aug 2, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@seefun
Copy link
Contributor

seefun commented Aug 2, 2023

Gluon Pretrained hrnet_w18_small and hrnet_w18_small_v2 has obvious advantages than these weights provided by torchvision / timm

hrnet_w18_small.ms_in1k 72.3 (Top1) | 90.7 (Top5) # timm
hrnet_w18_small.gluon_in1k 73.5 (Top1) | 91.0 (Top5) # gluon
hrnet_w18_small_v2.ms_in1k 75.1 (Top1) | 92.4 (Top5) # timm
hrnet_w18_small_v2.gluon_in1k 78.1 (Top1) | 93.8 (Top5) # gluon

These weights have been adapted into pytorch, which are able to download here:
https://drive.google.com/drive/folders/1-Tks3nh_WHIrYXGXbtSJQxJXKH5kol4H

Could you help add them to timm‘s huggingface hub

@seefun seefun added the enhancement New feature or request label Aug 2, 2023
@rwightman
Copy link
Collaborator

@seefun I'd noticed gluon ones but is there much point with the ssld / ms_aug weights I added? there was another set of aug weights but their file was corrupted...

model top1 top1_err top5 top5_err param_count img_size crop_pct interpolation
243 hrnet_w48_ssld.paddle_in1k 84.478 15.522 97.234 2.766 77.47 288 1.000
499 hrnet_w18_ssld.paddle_in1k 82.046 17.954 96.250 3.750 21.30 288 1.000
720 hrnet_w64.ms_in1k 79.474 20.526 94.646 5.354 128.06 224 0.875
734 hrnet_w48.ms_in1k 79.302 20.698 94.516 5.484 77.47 224 0.875
759 hrnet_w40.ms_in1k 78.930 21.070 94.464 5.536 57.56 224 0.875
762 hrnet_w44.ms_in1k 78.892 21.108 94.364 5.636 67.06 224 0.875
793 hrnet_w32.ms_in1k 78.444 21.556 94.188 5.812 41.23 224 0.875
812 hrnet_w30.ms_in1k 78.192 21.808 94.222 5.778 37.71 224 0.875
817 hrnet_w18.ms_aug_in1k 78.126 21.874 94.052 5.948 21.30 224 0.950
884 hrnet_w18.ms_in1k 76.752 23.248 93.444 6.556 21.30 224 0.875
923 hrnet_w18_small_v2.ms_in1k 75.114 24.886 92.414 7.586 15.60 224 0.875
963 hrnet_w18_small.ms_in1k 72.338 27.662 90.678 9.322 13.19 224 0.875

@seefun
Copy link
Contributor Author

seefun commented Aug 3, 2023

@rwightman
Paddle ssld weights is much better than ms/ms_aug weights, bug there are only two ssld pretrained weights released: hrw18 and hrw48;
Gluon weights is also much better than ms/ms_aug weights, but only in small models (hrnet_w18_small and hrnet_w18_small_v2);

In my actual downstream tasks, the pretrained models of SSLD(w18 / w48) and Gluon(SmallV1 / SmallV2) were used most frequently, which greatly improved the performance than ms_aug weights.

ImageNet

model top1 top5
hrnet_w18_small.ms_in1k 72.3 90.7
hrnet_w18_small.gluon_in1k 73.5(+1.2) 91.0
hrnet_w18_small_v2.ms_in1k 75.1 92.4
hrnet_w18_small_v2.gluon_in1k 78.1(+3.0) 93.8
hrnet_w18.ms_in1k 76.75 93.44
hrnet_w18.ms_aug_in1k 78.1 94.05
hrnet_w18_ssld.paddle_in1k 82.05 96.25
hrnet_w48.ms_in1k 79.30 94.52
hrnet_w48_ssld.paddle_in1k 84.48 97.23

CityScape

model iter mIOU
hrnet_w18_small.ms_in1k 40k 67.46
hrnet_w18_small.gluon_in1k 40k 68.17
hrnet_w18_small.ms_in1k 80k 71.06
hrnet_w18_small.gluon_in1k 80k 71.17
hrnet_w18_small_v2.ms_in1k 40k 73.51
hrnet_w18_small_v2.gluon_in1k 40k 75.81
hrnet_w18_small_v2.ms_in1k 80k 75.62
hrnet_w18_small_v2.gluon_in1k 80k 77.19

So I recommend adding only these two validated small models pretrained: hrnet_w18_small.gluon_in1k and hrnet_w18_small_v2.gluon_in1k from here

@rwightman
Copy link
Collaborator

@seefun okay, I'll look at doing this soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants