mzr1996
b5193a9029
[Fix] Reduce unit test memory usage of T2T-ViT
2022-05-16 17:01:30 +08:00
Hubert
59292b315a
[Feature] Support DenseNet. ( #750 )
...
* init add densenet implementation
* Add config and converted models
* update meta
* add test for memory efficient
* Add docs
* add doc for jit
* Update checkpoint path
* Update readthedocs
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-04-28 13:06:03 +08:00
takuoko
df6edd7f5a
[Feature] Support VAN. ( #739 )
...
* add van
* fix config
* add metafile
* add test
* model convert script
* fix review
* fix lint
* fix the configs and improve docs
* rm debug lines
* add VAN into api
Co-authored-by: Yu Zhaohui <1105212286@qq.com>
2022-04-28 09:35:17 +08:00
Ma Zerun
504e71c3e0
[Enhance] Reduce the memory usage of unit tests for Swin-Transformer. ( #759 )
2022-04-22 17:41:15 +08:00
Weihao Yu
2eb27d0d4e
[Feature] Add PoolFormer backbone and checkpoints. ( #746 )
...
* add PoolFormer
* fix some typos in PoolFormer
* fix lint error
* modify out_indices and gap
* fix typo
* fix lint
* fix typo
* fix typo in poolforemr README
* fix lint
* Update some paths
* Refactor freeze_stages method
* Add unit tests
* Fix lint
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-04-15 11:35:15 +08:00
Ezra-Yu
922a31a68e
[Feature] ADD RepMLP Backbone and checkpoints. ( #709 )
...
* add repmlp
* refactor backbone code
* add checkpoint, readme, unit tests
* unchange demo
* improve docstring.
* update pic
* refactor patch embed
* refactor unit tests
* fix lint
* update tools
* update tools
* Update checkpoint path
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-03-30 20:40:25 +08:00
Ezra-Yu
292127098f
[Feature] Add CSPNet and backbone and checkpoints ( #735 )
...
* add cspnet backbone
* try
* add backbones
* add cspnet
* add acc
* add unit tests
* chnage mode
* Update checkpoint path
* Fix typo
* Imporve CSPNet
* Update checkpoints
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-03-30 15:29:35 +08:00
Ma Zerun
d0d6f73fab
[Feature] Add `CustomDataset`. ( #738 )
...
* Add custom dataset and refactor ImageNet dataset
* Add default CLASSES for CIFAR dataset
* Add unit tests
* Imporve according to comments
2022-03-30 15:28:26 +08:00
huyu
a19c28fe95
[Enhance] Add `get_cat_ids` and `get_gt_labels` to KFoldDataset. ( #721 )
2022-03-23 15:57:36 +08:00
Hubert
04cb42a768
[Feature] Support ConvMixer. ( #716 )
...
* basic support for ConvMixer
* simplify
* add data pipeine config for timm
* Add model readme and metafile
* add unittest for convmixer
* add copyright
* modify
* add tests
* update model
* add conv2dAdaptivePadding replacement
* update model index
* fix comments
* Update checkpoint path
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-03-23 15:23:57 +08:00
takuoko
aa522f4309
[Feature] Support CUB dataset. ( #703 )
...
* support cub dataset
* support cub dataset
* fix train lint error
* add docs
* fix class label
Co-authored-by: Ezra-Yu <1105212286@qq.com>
* del debug code
* skip docformatter problem
* add unit tests
* add CUB baseline configs and chpts
* fix some typos
* fix name style
* update flops
Co-authored-by: Ezra-Yu <1105212286@qq.com>
2022-03-16 16:22:28 +08:00
takuoko
c1534f9126
[Feature] Support resizemix. ( #676 )
...
* add resizemix
* skip torch.__version__ < 1.7.0
* Update mmcls/models/utils/augment/resizemix.py
Co-authored-by: Ma Zerun <mzr1996@163.com>
* Update mmcls/models/utils/augment/resizemix.py
Co-authored-by: Ma Zerun <mzr1996@163.com>
* resize -> F.interpolate
* fix docs
* fix test
* add Copyright
* add argument interpolation
Co-authored-by: Ma Zerun <mzr1996@163.com>
2022-03-07 12:11:20 +08:00
Ma Zerun
c708770b42
[Enhance] Support dynamic input shape for ViT-based algorithms. ( #706 )
...
* Move `resize_pos_embed` to `mmcls.models.utils`
* Refactor Vision Transformer
* Refactor DeiT
* Refactor MLP-Mixer
* Refactor Swin-Transformer
* Remove `indexing` arg
* Support dynamic inputs for t2t_vit
* Add copyright
* Fix bugs in swin transformer
* Add `pad_small_maps` option
* Update swin transformer
* Handle `attn_mask` in checkpoints of swin
* Imporve by comments
2022-03-03 13:10:12 +08:00
HumberMe
1214df083d
[Enhance] Use PyTorch official `one_hot` to implement `convert_to_one_hot`. ( #696 )
...
* some change to mmcls/models/losses/utils.py:convert_to_one_hot()
* fixed problem: line too long
* fixed wrong output shape
* fixed lint PEP8 E128
* fix lint
* fix lint
* add unit tests
Co-authored-by: Ezra-Yu <1105212286@qq.com>
2022-02-28 10:20:31 +08:00
Ma Zerun
5f7322c211
[Fix] Fix Conformer forward with irregular input size. ( #686 )
...
* Auto pad the feature map to be divisible by 4.
* Add unit tests
* Use `trans_down_stride` instead of 4.
2022-02-28 10:17:52 +08:00
Ma Zerun
28e3bc8fd9
[CI] Add Windows CI. ( #708 )
...
* Update workflow to add Windows CI
* Add some optional requirements to requirements/optional.txt
* Update setup.py
* Update PyTorch version in Windows CI
* Update CI and requirement
* Replace `tempfile.NamedTemporaryFile` to avoid unit test error on
Windows
* Update tests
* Update CI
* Add OpenCV installation
* Update CI
2022-02-28 10:06:08 +08:00
Ezra-Yu
7fcaedcbfb
[Feature] Add ResNetV1c. ( #692 )
...
* add ResNetV1c
* add unit tests
* fix lint
* update docstring
* fix lint
2022-02-23 11:36:33 +08:00
takuoko
43024cda73
[Feature] Support gem pooling ( #677 )
...
* add gem pooling
* add example config
* fix params
* add assert
* add param clamp
* add test assert
* add clamp
* fix conflict
2022-02-17 02:17:36 +08:00
Ma Zerun
fcd57913ae
[Enhance] Upgrade isort pre-commit hooks. ( #687 )
...
* Use new version flake8 and isort hooks
* Fix missing copyright
2022-02-17 02:17:20 +08:00
Ma Zerun
bca695b684
[Refactor] Remove deprecation. ( #633 )
...
* Remove deprecated `--options` in some tools
* Remove deprecated eval hooks and fp16 hooks
* Remove deprecated mixup&cutmix, pretrained and return_tuple arguments.
* Remove deprecated `deprecated_options` in multi label dataset
* Remove deprecated `formating.py`
* Remove deprecated default mode of `LabelSmoothLoss`
* Revert pretrained argument, and remove it's deprecation sign.
* Update unit test
2022-02-10 09:30:18 +08:00
Ma Zerun
5de480ea9e
[Feature] Support HRNet and add pre-trained models ( #660 )
...
* Support HRNet
* Add HRNet configs
* Fix a bug in backward
* Add configs and update docs.
* Not use bias in conv before batch norm
* Defaults to use `norm_eval=False`
* Add unit tests and support out_channels in HRFuseScales
* Update checkpoint path
* Update docstring.
* Remove incorrect files
* Improve according to comments
2022-01-28 10:54:14 +08:00
Ma Zerun
dc456a0c2c
[Feature] Support ConvNeXt ( #670 )
...
* Support ConvNeXt
* Add configs of ConvNeXt
* Update dev scripts
* Update docs.
* Use new style README
* Add unit tests.
* Update README
* Imporve according to comments
* Modify refers to timm.
* Imporve according to comments
2022-01-28 10:36:45 +08:00
Ezra-Yu
94eb3ff83e
[Feature] Add Twins backbone and convert checkpoints. ( #642 )
...
* add twins backbone
* add position_encoding
* refactor twins
* Supplemental unit tests
* update docstring and readme
* update docstring and readme
* update docstring and readme
* update docstring
* update docstring
* update docstring
* update docstring
* remove note
* update doc and docstring
* update docstring
* update docstring
* use abstract pdf link and rename yamlfile
* Update model link
Co-authored-by: mzr1996 <mzr1996@163.com>
2022-01-27 10:25:05 +08:00
Ma Zerun
f552419e45
[Enhance] Add setup multi-processing both in train and test. ( #671 )
2022-01-27 10:18:36 +08:00
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
Ma Zerun
7dfc9e4a85
Bump version to v0.19.0 ( #623 )
2021-12-31 12:55:47 +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
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
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
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
894a82ea4f
[Refactor] Change `load_json_logs` to `load_json_log`. ( #602 )
2021-12-14 18:03:27 +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
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
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
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
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
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
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
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