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

ImageNet 1K pretrained weights #1638

Closed
hassancpu opened this issue Jan 16, 2023 · 2 comments
Closed

ImageNet 1K pretrained weights #1638

hassancpu opened this issue Jan 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@hassancpu
Copy link

Is your feature request related to a problem? Please describe.
Hey there, Ross! First off, thanks for this amazing library. Then, I need weights of Vision transformer models pretrained only on the ImageNet1K for my project.

Describe the solution you'd like
For different ViT models, I downloaded weights pretrained on ImageNet1K from the google repository, but I wonder how I can convert those weights. I would be grateful if you could share the converted weights of the models pretrained only on the ImageNet1K.

@hassancpu hassancpu added the enhancement New feature or request label Jan 16, 2023
@rwightman
Copy link
Collaborator

@hassancpu timm can load any of the google pretrained weights using included helper

https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/vision_transformer.py#L774-L798

There are some in1k weights from Google (How to train your vit paper) on main branch / 0.8.x pre-releases. There were no in1k vit weights before that, they were all 21k pretrained. None of the Google in1k vit weights are very good, only the DeiT in1k weights are decent, there really isn't much architecture difference of note for deit other than layer scale.

@hassancpu
Copy link
Author

I see! I would use the older version, but now, I can fine-tune those models. I have got another question; I wonder if there is any convolutional network pretrained on ImageNet21K and fine-tuned on ImageNet1K with the input imagesize of 224. I think I would be able to use the shared ConvNext weights, but what about other models?
Thanks for your time and consideration!

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