-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Support ViTPose #1937
Conversation
Thank you very much for your help! For now, there are lint issues in the code. Could you please install pre-commit hooks (see our docs) and run |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev-0.x #1937 +/- ##
==========================================
Coverage ? 84.10%
==========================================
Files ? 242
Lines ? 21227
Branches ? 3652
==========================================
Hits ? 17853
Misses ? 2450
Partials ? 924
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Thanks for your instruction. The code is checked now. How can I upload the pre-trained weights and logs for the ViTPose variants? Can I provide the links using OneDrive or Google Drive? |
Thanks. Both OneDrive and Google Drive are welcome. BTW, would you mind adding some unit-tests? An example could be found https://github.com/open-mmlab/mmpose/pull/1907/files#diff-dadc2075341a40335f28131ceaf3d0d415e5c316c54bb6b0a0741aeb002db24e |
The unit test of ViTPose seems failed. For quick debugging, you can run unit tests locally by |
Thanks a lot for your help! The files and configs have been updated now. The pre-trained models and logs are available at Onedrive. The uncovered codes by the unit test are mostly existing in the init weight using the pre-trained models part (for example, changing the tensor name between the MAE pre-trained models and the backbones). We are wondering how can we cover these parts in the unit test. Can we produce pseudo checkpoints via |
We also fixed some bugs caused by the updated NumPy version in the dataset files. Please check the recent commits. By the way, it seems that the current failed build is cased by the HTTP error. |
Hi @ly015, would you mind restarting the failed checks? I just checked the logs, and it seems that the pip installation caused the error. Thanks a lot. |
It seems that the current failure information is related to the docker version... Should I open a new PR for the dev-1.x branch and close this PR instead? Thanks a lot for your patience. |
We will help check and fix the CI problem. |
Hi, is there anything we can do to help fix the CI problem? Besides, could we open a new PR based on the dev-1.x branch to merge the ViTPose variants into mmpose? Thanks for your response. |
new_key = k.replace('patch_embed.proj', | ||
'patch_embed.projection') | ||
new_ckpt[new_key] = v | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The downloaded backbone has keys norm.weight
and norm.bias
, but in the model the two are called last_norm.weight
and last_norm.bias
, it is necessary to add another conversion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need. The last norm layer is re-initialized for the pose dataset.
I have trained these models using your code and downloaded pretrained backbones. However, the results for some models mismatch with your record.
The validation accuracy is the same for all models. I also noticed that the highest accuracy for large and huge models is at around 80th epoch. Maybe there is a problem with the optimizer? Have you validated the training process on this PR? |
Hi |
Yes, you can use timm for the backbone implementation. There is a tutorial in MMDetection on how to use timm backbones in MMDetection through an MMClassification wrapper, which should also be applicable for MMPose: https://mmdetection.readthedocs.io/en/latest/tutorials/how_to.html#use-backbone-network-in-timm-through-mmclassification The above tutorial is just for your reference. You can use any approach to integrate timm backbones in your implementation. |
Hi there, Thanks for your patience. We have uploaded a timm version of the ViTPose. The training logs are available here. |
Hi there, Are there any things we could help to aid the merge of the PR? We are willing to provide more information. Best, |
Motivation
Merge the ViTPose variants code and pre-trained models into mmpose.
Modification
__init__
file is modified accordingly.BC-breaking (Optional)
No.
Use cases (Optional)
Checklist
Before PR:
After PR: