mindspore-lab / mindcv

A toolbox of vision models and algorithms based on MindSpore
https://mindspore-lab.github.io/mindcv/
Apache License 2.0
235 stars 143 forks source link

Update ViT for feature extraction, support elative positional embedding and layer scale #733

Closed SamitHuang closed 1 year ago

SamitHuang commented 1 year ago

Thank you for your contribution to the MindCV repo. Before submitting this PR, please make sure:

Motivation

Previous ViT mainly aimed at image classification, which is not convenient to extend for unsupervised learning or detection. This PR makes ViT more extendable.

Test Plan

python infer.py --model vit_b_32_224 --image two_cats.jpg

Related Issues and PRs

(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)

SamitHuang commented 1 year ago

TODO: upload the checkpoints with the new param names

SamitHuang commented 1 year ago

TODO: upload the checkpoints with the new param names

done

SamitHuang commented 1 year ago

closed. Progress will be continued in https://github.com/mindspore-lab/mindcv/pull/707