Commit Graph

12 Commits (643fb192cdad25a2faf0237059ef5bf97c65b5c8)

Author SHA1 Message Date
Ma Zerun 643fb192cd
[Enhance] Enhance feature extraction function. (#593)
* Fix MobileNet V3 configs

* Refactor to support more powerful feature extraction.

* Add unit tests

* Fix unit test

* Imporve according to comments

* Update checkpoints path

* Fix unit tests

* Add docstring of `simple_test`

* Add docstring of `extract_feat`

* Update model zoo
2021-12-17 15:55:02 +08:00
Ezra-Yu 34d5a25281
[Refactor] Support passing arguments to loss from head. (#523) 2021-11-10 17:12:34 +08:00
Ma Zerun 2932f9d8a3
[Refactor] Refator ViT (Continue #295) (#395)
* [Squash] Refator ViT (from #295)

* Use base variable to simplify auto_aug setting

* Use common PatchEmbed, remove HybridEmbed and refactor ViT init
structure.

* Add `output_cls_token` option and change the output format of ViT and
input format of ViT head.

* Update unit tests and add test for `output_cls_token`.

* Support out_indices.

* Standardize config files

* Support resize position embedding.

* Add readme file of vit

* Rename config file

* Improve docs about ViT.

* Update docstring

* Use local version `MultiheadAttention` instead of mmcv version.

* Fix MultiheadAttention

* Support `qk_scale` argument in `MultiheadAttention`

* Improve docs and change `layer_cfg` to `layer_cfgs` and support
sequence.

* Use init_cfg to init Linear layer in VisionTransformerHead

* update metafile

* Update checkpoints and configs

* Imporve docstring.

* Update README

* Revert GAP modification.
2021-10-18 16:07:00 +08:00
Ma Zerun 2e6c7cf87d
[Docs] Add code-spell pre-commit hook and fix a large mount of typos. (#470)
* Add code spell check hook

* Add codespell config

* Fix a lot of typos.

* Add formating.py to keep compatibility.
2021-10-13 14:33:07 +08:00
Ma Zerun f9eb9b409b
[Docs] Add Copyright information. (#413) 2021-08-17 19:52:42 +08:00
Ma Zerun f8f1700860
[Refactor] Use post_process function to handle pred result processing. (#390)
Use post_process function to handle pred result processing in `simple_test`.
2021-08-12 11:54:24 +08:00
Ma Zerun 71621a5f62
Add `is_tracing` helper function to fix a tracing bug in PyTorch 1.6 (#347) 2021-07-07 11:55:53 +08:00
AllentDan a24a9f6faa
[Fix] Build compatible with low pytorch versions (#301)
* add version compatible for torchscript

* doc

* doc again

* fix lint

* fix lint isort
2021-06-14 23:25:35 +08:00
AllentDan c2f01e0dcd
[Feature] Add torchscript deployment (#279)
* add torchscript deploy

* fix lint

* add check and delete \
2021-06-12 21:50:48 +08:00
whcao 5e1a02103f
[Feature]Delete comments (#298)
* add mytrain.py for test

* test before layers

* test attr in layers

* test classifier

* delete mytrain.py

* delete comments
2021-06-12 21:45:22 +08:00
whcao b30f79ea4c
[Feature]Modify Parameters Passing in models.heads (#239)
* add mytrain.py for test

* test before layers

* test attr in layers

* test classifier

* delete mytrain.py

* set cal_acc in ClsHead defaults to False

* set cal_acc defaults to False

* use *args, **kwargs instead

* change bs16 to 3 in test_image_classifier_vit

* fix some comments

* change cal_acc=True

* test LinearClsHead
2021-05-10 14:56:55 +08:00
whcao affb39fe07
[Feature]Add Vit (#214)
* add imagenet bs 4096

* add vit_base_patch16_224_finetune

* add vit_base_patch16_224_pretrain

* add vit_base_patch16_384_finetune

* add vit_base_patch16_384_finetune

* add vit_b_p16_224_finetune_imagenet

* add vit_b_p16_224_pretrain_imagenet

* add vit_b_p16_384_finetune_imagenet

* add vit

* add vit

* add vit head

* vit unitest

* keep up with ClsHead

* test vit

* add flag to determiine whether to calculate acc during training

* Changes related to mmcv1.3.0

* change checkpoint saving interval to 10

* add label smooth

* default_runtime.py recovery

* docformatter

* docformatter

* delete 2 lines of comments

* delete configs/_base_/schedules/imagenet_bs4096.py

* add configs/_base_/schedules/imagenet_bs2048_AdamW.py

* rename imagenet_bs4096.py to imagenet_bs2048_AdamW.py

* add helpers.py

* test vit hybrid backbone

* fix HybridEmbed

* use to_2tuple instead
2021-04-16 19:22:41 +08:00