Commit Graph

19 Commits (27e685fe1063176516f8520987f1c15cae2ea559)

Author SHA1 Message Date
mzr1996 27e685fe10 [Feature] Add `BaseDataset`, `CustomDataset`, `ImageNet` and `ImageNet21k` 2022-07-18 10:53:27 +08:00
Ezra-Yu 088d5b5add [Refactor] Inherit all registries from MMEngine and use inherited registries. 2022-07-18 10:53:27 +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
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
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
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 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
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
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
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
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
Ezra-Yu 2ce5825ef1
[Feature] Support ImageNet21k dataset. (#461)
* add imagnet21k

* Update unit test

* update imaenet21k

* use slots

* use slots

* rename Data_item to ImageInfo

* add unit tests

* Update unit tests

* rm some print

* update unit tests

* fix lint

* remove default value of pipeline
2021-10-28 15:22:08 +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 6a0a76af0c
[Enhance] Add `hparams` argument in `AutoAugment` and `RandAugment` and some other improvement. (#398)
* Add hparams argument in `AutoAugment` and `RandAugment`.

And `pad_val` supports sequence instead of tuple only.

* Add unit tests for `AutoAugment` and `hparams` in `RandAugment`.

* Use smaller test image to speed up uni tests.

* Use hparams to simplify RandAugment config in swin-transformer.

* Rename augment config name from `pipeline` to `pipelines`.

* Add some commnet ad docstring.
2021-08-24 18:15:54 +08:00
Ma Zerun f9eb9b409b
[Docs] Add Copyright information. (#413) 2021-08-17 19:52:42 +08:00
Ma Zerun 15cd34bbef
[Fix] Use zero as default value of `thrs` in metrics. (#341)
* Use zero as default value of `thrs` in metrics. And it accepcts a number
instead of float now.

* Fix unit test comment

* Don't pass thrs if no thrs.
2021-07-18 16:57:21 +08:00
Ma Zerun 1a7cebe4b9
[Refactor] Refactor unittest (#321)
* Refactor unit tests folder structure.

* Remove label smooth and Vit test in `test_classifiers.py`

* Rename test_utils in dataset to test_dataset_utils

* Split test_models/test_utils/test_utils.py to multiple sub files.

* Add unit tests of classifiers and heads

* Use patch context manager.

* Add unit test of `is_tracing`, and add warning in `is_tracing` if torch
verison is smaller than 1.6.0
2021-07-08 22:49:05 +08:00