Commit Graph

482 Commits (d56170a73403431b042dcee537fa479e5d0bda5f)
 

Author SHA1 Message Date
Zhicheng Chen d56170a734
[Feature] Support EfficientNet (#649)
* add config for resnest test

* fix config

* add label smoothing

* add memcached

* minor fix

* fix bug

* fix config

* add config

* minor fix

* fix configs

* use EResize

* change interpolation

* add more configs

* add docsting

* add unittest

* remove unnecessary changes

* minor fix

* add more docstring

* fix linting

* add efficient backbone

* add config

* add Edge Residual

* fix bug

* remove unnecessary files

* refactor

* add resize in crop to ensure crop size is output size

* fix bug and add comments

* test

* fix

* add more configs

* add more configs

* add more configs

* fix bug

* add model zoo

* fix

* reorganize code

* add edge tpu

* add edge tpu converter

* rename

* update readme

* reorganize code and config

* Rename configs of EfficientNet, and add metafile & model_zoo

* Remove `backend='pillow'`

* Add comments about EfficientNet-EdgeTPU

* Rename the convert tool of EfficientNet.

* Refactor EfficientNet and update docstring.

* Update EfficientNet-EdgeTPU config

* Fix unit tests

Co-authored-by: lixinran <lixr423@outlook.com>
Co-authored-by: lixinran <lixinran@sensetime.com>
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-01-25 12:14:17 +08:00
Yosuke Shinya 16864c7495
[Feature] Support features_only in TIMMBackbone (#668)
* Support features_only in TIMMBackbone

based on https://github.com/open-mmlab/mmsegmentation/pull/998

* update test for mmdet

* fix unit test for build_without_timm

* Update docstring

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-01-25 11:22:23 +08:00
Yusuke Minami e694269c59
[Enhance] Support single-label, softmax, custom eps by asymmetric loss (#609)
Co-authored-by: Minyus <Minyus@users.noreply.github.com>
2022-01-21 11:35:14 +08:00
takuoko d29037e8d1
[Enhance] Suport Mixup&Cutmix for multi-label task. 2022-01-21 11:30:58 +08:00
Ma Zerun b39885d953
[Feature] Support K-fold cross-validation (#563)
* Support to use `indices` to specify which samples to evaluate.

* Add KFoldDataset wrapper

* Rename 'K' to 'num_splits' accroding to sklearn

* Add `kfold-cross-valid.py`

* Add unit tests

* Add help doc and docstring
2022-01-19 18:32:55 +08:00
mzr1996 321ad09e6d Merge remote-tracking branch 'origin/master' into dev 2022-01-13 19:27:23 +08:00
Rejnald Lleshi c07f8326e3
[Feature] Add conversion script from pytroch to mlmodel (#597) 2022-01-13 12:32:52 +08:00
imyhxy 32d606e1a1
[Refactor] Save class names in best checkpoint created by evaluation hook (#641)
* Save class names in best checkpoint created by evaluation hook

* Save meta info into runner instaed of checkpoint_config
2022-01-13 12:20:59 +08:00
Ma Zerun 5232965b17
[Docs] Update install guide and README (#624)
* Update install guide

* Add new repos in README and use readthedocs link preferentially.

* Add MMRazor

* Improve README

* Imporve docs

* Imporve docs
2022-01-04 11:38:05 +08:00
Ma Zerun 7dfc9e4a85
Bump version to v0.19.0 (#623) 2021-12-31 12:55:47 +08:00
mzr1996 cdf569a805 Fix ResNet rsb config 2021-12-31 11:12:21 +08:00
mzr1996 e1a4020168 Fix ResNet rsb config 2021-12-31 11:08:11 +08:00
mzr1996 0a07d47b4a Update gitignore and docs requirements 2021-12-29 14:26:43 +08:00
Zhicheng Chen 0bbbb04429
[Enhancement] Improve the accuracy of ResNet (#572)
* add itp timm

* minor update

* minor update

* minor update

* add rep aug, minor update on configs

* minor update

* add target threshold

* add decaymulti

* minor update

* minor update

* add lbl smooth

* update lr

* reorganize config files and code

* minor bugfixes

* remove unused parts and minor fixes on cfg

* critical bugfix, add test and cfg update

* refactor code

* update doc string

* remove duplicate code

* refactor drop path in resnet

* rename

* Modify configs and add README&metafile

* Update metafile

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-29 10:58:42 +08:00
Ezra-Yu e7c06b8541
[Reproduction] Reproduce RegNetX training accuracy. (#587)
* add preciseBN hook

* add precise-bn config

* add proority of preciseBN

* Add precise BN hook

* Update PreciseBN hook

* add config example & pre-commit

* Update PBN

* Add unit test

* Update unit tests

* mv preciseBN to mmcls.runner

* rm extra sleep()

* merge latest

* update code

* fix lint

* update unit tests

* add regnetx configs

* update prcise BN in configs

* fix lint

* add checkpoints and logs

* fix conflict

* fix lint

* update model_zoo and model-index

* remove some changes

* update readme.md

* remove precise_bn.py
2021-12-28 17:34:27 +08:00
Ma Zerun 159b38d276
[Reproduction] Reproduce training results of T2T-ViT (#610)
* Add cosine cool down lr updater

* Use ema hook

* Update decay mult

* Update configs.

* Update T2T-ViT readme and format all readme

* Update swin readme

* Update tnt readme

* Add docstring for `CosineAnnealingCooldownLrUpdaterHook`.

* Update t2t readme and metafile
2021-12-28 15:09:40 +08:00
Ezra-Yu d1d9ebfc67
[Feature] Add Precise BN (#401)
* add preciseBN hook

* add precise-bn config

* add proority of preciseBN

* Add precise BN hook

* Update PreciseBN hook

* add config example & pre-commit

* Update PBN

* Add unit test

* Update unit tests

* mv preciseBN to mmcls.runner

* rm extra sleep()

* merge latest

* update code

* fix lint

* update unit tests

* update unit tests and add warning

* update docstring and renamme filename

* remove model warpper

* add copyright

* Imporve docs and update some variable names

* Update resnet50_8xb32-coslr-preciseBN_in1k.py

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-24 16:28:42 +08:00
Ezra-Yu 131d8c6296
[Feature] Add CAM visualization tool (#577)
* add cam-grad tool

* refactor cam-grad tool

* add docs

* update docs

* Update docs and support Transformer

* remove pictures and use link

* replace example img and finish EN docs

* improve docs

* improve code

* Fix MobileNet V3 configs

* Refactor to support more powerful feature extraction.

* Add unit tests

* Fix unit test

* fix distortion of visualization exapmles in docs

* fix distortion

* fix distortion

* fix distortion

* merge master

* merge fix conficts

* Imporve the tool

* Support use both attribute name and index to get layer

* add default get_target-layers

* add default get_target-layers

* update docs

* update docs

* add additional printt info when not using target-layers

* Imporve docs

* Fix enumerate list.

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-23 18:53:40 +08:00
Zhicheng Chen da39ca6898
[Fix] Fix test sampler bug. (#611)
* sampler bugfixes

* sampler bugfixes

* reorganize code

* minor fixes

* reorganize code

* minor fixes

* Use `mmcv.runner.get_dist_info` instead of `dist` package to get rank
and world size.

* Add `build_dataloader` unit tests and fix sampler's unit tests.

* Fix unit tests

* Fix unit tests

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-23 18:07:41 +08:00
Zhicheng Chen d5ae255061
[Feature] Repeated Aug and Sampler Registry (#588) 2021-12-21 15:26:28 +08:00
mzr1996 b4450b720e [Docs] Fix colab link 2021-12-17 18:07:19 +08:00
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
Ma Zerun f9a2b04cee
[Feature] Add DeiT backbone and checkpoints. (#576)
* Support DeiT backbone.

* Use hook to automatically resize pos embed

* Update ViT training setting

* Add deit configs and update docs

* Fix vit arch assertion

* Remove useless init function

* Add unit tests.

* Fix resize_pos_embed for DeiT

* Improve according to comments.
2021-12-15 22:44:57 +08:00
Ma Zerun 6f25bebe42
[Docs] Update docs. (#600)
* [Docs] The template provides united Docs and OpenMMLab drop-lists in
banner. Remove them from our `conf.py`.

* Move docs of different languages to the same folder
2021-12-15 10:34:34 +08:00
Ma Zerun 894a82ea4f
[Refactor] Change `load_json_logs` to `load_json_log`. (#602) 2021-12-14 18:03:27 +08:00
Ma Zerun c7c5ab7a04
[Dev] Update benchmark regression tools (#556)
* Update benchmark tools

* Fix AccessDeniedError

* Support to calculate flops and params with benchmark_valid.py

* Fix typo
2021-12-14 17:19:32 +08:00
mzr1996 e57b8cb33b [Fix] Fix docs generation. 2021-12-14 16:23:56 +08:00
mzr1996 5078869b4b [Fix] Fix cal_acc bug caused by the return type of accuracy. 2021-12-14 16:21:25 +08:00
Ma Zerun e3cf1881bb
[Enhance] Imporve efficiency of precision, recall, f1_score and support. (#595)
* [Enhance] Imporve efficiency of precision, recall, f1_score and support.

* Fix bugs

* Use np.maximum since torch doesn't have maximum before torch 1.7

* Fix bug
2021-12-13 17:24:59 +08:00
Zhicheng Chen 851b438574
[Feature] Support LAMB optimizer. (#591)
* impl lamb

* Add unit tests

* Fix unit test

* Fix unit tests

* Use list instead of tuple in `__all__` according to PEP8

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-13 17:24:44 +08:00
Ma Zerun 188aa6ed5d
[Enhance] Improve accuracy calculation performance. (#592)
* Imporve accuracy calculate performance.

* Add unit tests for accuracy

* Reuse state_inds
2021-12-09 14:06:08 +08:00
Ezra-Yu 72b0da8bd7
[Docs] Update mmcv, torch, cuda version in Dockerfile and docs (#594) 2021-12-08 18:59:21 +08:00
Eduardo López d232912391
[Enhance] Added NumClassCheckHook and unit tests (#559)
* Added NumClassCheckHook and CI tests

* Added HOOKS local registry. NumClassCheckHook and unit test files redistribution.

* Extended hook for supporting IterRunner & EpochRunner. Extended unit test.

* Simplification of ClassNumCheckHook. Minor changes.
2021-12-08 18:15:05 +08:00
Ma Zerun abd7001bd9
[Fix] Try to create a symbolic link, otherwise copy. (#580) 2021-12-08 18:08:14 +08:00
Ma Zerun 58ab028f97
[CI] Cancel previous runs that are not completed. (#583)
* [CI] Cancel previous runs that are not completed.

* Test cancel CI
2021-12-07 15:14:14 +08:00
Zhiliang Peng 18f6bb0b10
[Feature] Implement the conformer backbone. (#494)
* implement the conformer

* format code style

* format code style

* reuse the TransformerEncoderLayer in the vision_transformer.py

* Modify variable name

* delete unused params

* Remove warning info in Conformer head since it already exists in
Conformer.

* Rename some variables

* Add unit tests

* Use `getattr` instead of `get_submodule`.

* Remove some useless layers

* Refactor conformer and add configs

* Update configs and add metafile.

* Fix unit tests

* Update README

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-07 14:00:17 +08:00
fangxu 0aa789f3c3
[Feature] Add the frozen function for Swin Transformer model. (#574)
* Add the frozen function for Swin Transformer model

* add frozen parameter for swin transformer model

* add norm_eval parameter

* Delete =11.1

* Delete =418,driver

* delete _BatchNorm

* remove LayerNorm , add _BatchNorm

* unifying the style of frozen function refer ResNet

* Improve docs and add unit tests.

Co-authored-by: cxiang26 <cq.xiang@foxmail.com>
Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-07 11:58:14 +08:00
mzr1996 ca0cf41df9 Add .gitattributes 2021-12-07 11:55:58 +08:00
Ezra-Yu fdb178303b
[Docs] Add analysis&misc docs (#525)
* refactor ananlysis_log and add docs

* refactor ananlysis_log and fix lint

* improve docs

* improve docs

* improve docs

* fix bugs and refactor analysis_log

* rename analysis folder to analysis_tools

* fix failure link

* add result analysis docs

* add eval-metrics docs

* add misc doc

* fix lint

* improve docs

* improve misc docs

* fix docs

* Change the `eval_options` in `tools/analysis_tools/eval_metric.py` to
`metric_options`

* Improve tutorials

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-07 11:27:34 +08:00
Ezra-Yu b3a6cae522
[Docs] Fix failure links (#586)
* Update T2T link

* Add ResNeSt comfig links
2021-12-07 11:26:36 +08:00
Ma Zerun f2c1c57398
[Docs] Fix docs build dependency. (#584)
* Fix docs.

* Add MMHuman3D
2021-12-07 11:16:33 +08:00
fangxu c090d3f7fd
[Fix] Fix a bug for multiple output in swin transformer. (#571)
* Update swin_transformer.py

fix bug;

layer_norm 0,1,2,3  will be the same and resulted in an error when out_indices dict exceed one element.

* fix bug, layer_norm 0,1,2,3

* Add unit tests for multiple out_indices

Co-authored-by: cxiang26 <cq.xiang@foxmail.com>
Co-authored-by: mzr1996 <mzr1996@163.com>
2021-12-03 16:11:41 +08:00
Ezra-Yu 7b37bc5bf5
[Refactor] Refactor `analysis_log.py`. (#529)
* fix bugs and refactor analysis_log

* update some names
2021-12-03 16:02:50 +08:00
Ma Zerun d25a78d547
[Enchance] Set a random seed when the user does not set a seed. (#554) 2021-12-02 18:09:55 +08:00
Ma Zerun 78d6d8503f
[Refactor] Use new API of matplotlib to handle blocking input in visualization. (#568)
* [Refactor] Use new API of matplotlib to handle blocking input in
visualization.

* Modify unit tests
2021-12-02 17:46:40 +08:00
Ma Zerun 33f049b4c2
[CI] Skip build CI if only configs or docs modification. (#575)
* [CI] Skip build CI if only configs or docs modification.

* Use ubuntu latest
2021-12-02 16:05:10 +08:00
takuoko 9d9dce69ad
[Feature] Support using checkpoint in Swin Transformer to save memory. (#557)
* add checkpoint in swin backbone

* add checkpoint in swin backbone
2021-12-01 11:49:00 +08:00
Ma Zerun f6076bfeca
Bump version to v0.18.0 (#569)
* Bump version to v0.18.0

* Add highlight of previous version in readme

* Imporve docs
2021-11-30 19:04:38 +08:00
Ezra-Yu 4ddfd3d508
[Docs] Fix vit config and model broken links (#564)
* Update model_zoo.md

* Update model_zoo.md

* fix config link

* fix config link
2021-11-30 16:49:15 +08:00
Ma Zerun 00700d570f
[CI] Use CircleCI to do unit tests. (#567)
* Add .circleci/config.yml

* Use new markdown lint
2021-11-30 14:22:02 +08:00