Commit Graph

657 Commits (e4e8047563f93cfb1695638107f0b47f5afb8d7b)
 

Author SHA1 Message Date
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
mzr1996 6e69f91328 [Docs] Add MMFewshot in README and banner. 2021-11-29 19:00:51 +08:00
juanjompz 715a80b09c
[Enhance] Focal loss for single label tasks (#548)
* Added focal loss support to single label tasks.

* Updated focal loss docstring
2021-11-26 12:36:49 +08:00
Ezra-Yu 4b2128fdbd
[Fix] Fix bug when using `ClassBalancedDataset` (#555)
* fix dataset wrapper bug and add unit tests

* fix dataset wrapper bug and add unit tests

* update unit tests

* fix lint

* align interface to mmdet

* update unit tests
2021-11-26 09:40:00 +08:00
mzr1996 2266a59a9d Update CI 2021-11-25 15:58:41 +08:00
Zhicheng Chen fc8adbc149
[Enhance] Add metafile, readme and converted models for MLP-Mixer (#539)
* add pth converter

* minor update on config files, add metafile and readme

* add missing readme and minor fixes

* minor fixes

* Update config names and checkpoint download link

* Update model_zoo.md

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-11-24 19:04:19 +08:00
Ma Zerun f3fbc8b90b
[Docs] Add abstract and image for every paper. (#546) 2021-11-24 17:23:37 +08:00
Ma Zerun ca997c5a79
Update schedule.md 2021-11-22 14:18:01 +08:00
Ma Zerun 23de5cccf9
Update schedule.md 2021-11-22 14:17:26 +08:00
Ma Zerun a55324c453
[Refactor] Remove useless `import_modules_from_string`. (#544) 2021-11-22 14:01:26 +08:00
Ezra-Yu f361bd52e9
[Fix] Fix a bug when using iter-based runner with 'val' workflow (#542)
* add kwargs and default of optimizer in train_step and val_step

* update docstring

* update docstring

* update optional annotation
2021-11-22 12:06:47 +08:00
LeoXing1996 49cbfd776a
[Fix] Fix interpolation method checking in `Resize` (#547)
* fix interpolation method checking in resize

* revise docstring + add unit test
2021-11-19 17:38:25 +08:00
Ma Zerun 7977dc8e2d
[Improvement] Rename config files according to the config name standard. (#508)
* Update tnt config

* Rename config files

* Update docs

* Update metafile in dev_scripts

* Fix some files

* Remove fp16 metafile and README.

* Fix names in metafiles.
2021-11-19 14:20:35 +08:00
Ma Zerun 598ecd4008
[Docs] Add mmflow and mim in banner and readme (#543) 2021-11-19 11:33:17 +08:00
Ezra-Yu 771d10548c
[Docs] Add schedule and runtime tutorial docs (#499)
* add cn tutorials/config.md

* add heads api and doc title link

* Update tutorials index

* Update tutorials index

* Update config.md

* add english version

* Update config.md

* add custom_runtime

* Update docs

* modify title

* modify en to zh_CN in chinses docs

* Update Readme

* fix punctuations

* Update docs/tutorials/customize_runtime.md

Co-authored-by: Ma Zerun <mzr1996@163.com>

* Update docs/tutorials/customize_runtime.md

Co-authored-by: Ma Zerun <mzr1996@163.com>

* split to schedule and runtime

* fix lint

* improve docs after review

* fix TOC

* imporve expersion

* fix an error

* Imporve schedule.md

* Improve runtime.md

* Improve chinese docs.

* Fix toc-tree

* fix en link and add a case of gradient clipping

* fix wrong word

Co-authored-by: Ma Zerun <mzr1996@163.com>
2021-11-17 18:12:54 +08:00
takuoko 9f31fc5390
[Refactor] Use `reset_classifier` to remove head of timm backbones. (#534)
* refactor timm backbone

* fix comment
2021-11-16 16:24:55 +08:00
xcnick 3eafc5cbe1
[Feature] Add MLP Mixer Backbone. (#528)
* Add Mlp Mixer

* Fix token_mix FNN add_identity and add out_indices

* Fix mlp_mixer unit test
2021-11-15 18:25:22 +08:00
huoshuai-dot 3f52488d52
[Docs] Add the top-5 acc in ResNet-CIFAR README. (#531)
* Update README.md

* Update README.md
2021-11-12 16:13:41 +08:00
Ma Zerun e0d32df076
[Fix] Fix a bug when load checkpoints in mulit-GPUs environment. (#527)
* Fix a bug when load checkpoints in mulit-GPUs environment.

* Map the weights to CPU
2021-11-10 17:54:43 +08:00
Ezra-Yu 87c67a6a79
[Feature] Support positive weights in BCE. (#516)
* add pos-weight in BCE

* mv pos-weight to kwargs
2021-11-10 17:14:12 +08:00
Ezra-Yu 34d5a25281
[Refactor] Support passing arguments to loss from head. (#523) 2021-11-10 17:12:34 +08:00
Zhicheng Chen 9ab9d4ff31
[Refactor] Refactor `Resize` transform and add `Pad` transform. (#506)
* refactor resize, test tobe done

* resize reimpl according to discussion; add pad

* minor fixes and add tests

* minor fixes on docstring

* add additional unit test

* reformat resize and pad

* revise code and docstr according to the comments
2021-11-10 16:46:49 +08:00
imyhxy dc35eb62b6
[Fix] Fix an error on indexing scalar metrics in `analyze_result.py` (#518)
* [Fix] Error on indexing scalar metrics

* [Fix] Error on indexing scalar metrics

Co-authored-by: Ma Zerun <mzr1996@163.com>

Co-authored-by: Ma Zerun <mzr1996@163.com>
2021-11-05 11:57:49 +08:00
Ma Zerun 29f512156c
[Docs] Fix TOC of `visualization.md` and add example images. (#513) 2021-11-03 12:21:05 +08:00
imyhxy abb5a222cf
[Fix] Fix wrong condition judgment in `analyze_logs.py` and prevent empty curve. (#510)
* [Fix] Analyze logs with single training iteration

* [Fix] Make `plot_curve` with 'accuracy' metric

* [Fix] Assert length of training log records of each epoch is larger than 1

Co-authored-by: Ma Zerun <mzr1996@163.com>

Co-authored-by: Ma Zerun <mzr1996@163.com>
2021-11-03 11:37:51 +08:00
Ezra-Yu b486bb23f8
[Feature] Add a tool to visualize learning rate in each iterations (#498)
* add vis lr

* add doc

* Update doc and rm load_json_log in analysis

* Update docs

* add unit tests and update docstring

* fix unit-tests

* Use DummyIterBasedRunner and DummyEpochBasedRunner to simulate training
process.

* rm function val and add judge

* update docs

* improve english expression

* Update docs/tools/visualization.md

Co-authored-by: Ma Zerun <mzr1996@163.com>

* fix typo and ImageNet datasize

* fix typo

* update example

Co-authored-by: mzr1996 <mzr1996@163.com>
2021-11-03 10:48:56 +08:00