Commit Graph

228 Commits (0979e785737baa0342a6be2917736a58669a1238)

Author SHA1 Message Date
mzr1996 0979e78573 Rename the package name to `mmpretrain`. 2023-02-17 15:20:55 +08:00
QINGTIAN 8352951f3d
[Feature] Support XCiT Backbone. (#1305)
* update model file

* Update XCiT implementation and configs.

* Update metafiles

* Update metafile

* Fix floor divide

* Imporve memory usage

---------

Co-authored-by: qingtian <459291290@qq.com>
Co-authored-by: mzr1996 <mzr1996@163.com>
2023-02-15 10:32:35 +08:00
Ma Zerun bedf4e9f64
[Refactor] Update analysis tools and documentations. (#1359)
* [Refactor] Update analysis tools and documentations.

* Update migration.md and add unit test.

* Fix print_config.py
2023-02-15 10:28:08 +08:00
Ma Zerun b4ee9d2848
[Feature] Support calculate confusion matrix and plot it. (#1287)
* [Feature] Support calculate confusion matrix and plot it.

* Fix keepdim

* Update confusion_matrix tools and the plot graph.

* Revert accidental modification.

* Update docstring

* Move confusion matrix tool to
2023-02-14 12:58:11 +08:00
takuoko 841256b630
[Feature] Support RetrieverRecall metric & Add ArcFace config (#1316)
* rebase

* add ap metric

* fix mlti-gpu bug in retrevel

* rebase

* rebase

* add training cfgs and update readme.md

* fix bugs(cannot load vecs in dist and diff test-val recall\)

* update configs and readme

* fix ut

* fix doc

* rebase

* fix rebase conflicts

* fix rebase error

* fix UT error

* fix docs

* fix typo

---------

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2023-02-14 12:46:21 +08:00
huangxuming 1c1273abca
[Docs] Translate some tools tutorials to Chinese. (#1321)
* Delete print_config.md

* Add files via upload
2023-02-09 16:40:13 +08:00
Ma Zerun 7ec6062415
[Refactor] Unify the `--out` and `--dump` in `tools/test.py`. (#1307) 2023-02-09 14:05:03 +08:00
Ma Zerun a3f2effb17
[Feature] Add `ImageClassificationInferencer`. (#1261)
* [Feature] Add ImageClassificationInferencer.

* Update inferencer implementation and add unit tests.

* Update documentations.

* Update pre-commit hook

* Update docs
2023-02-08 14:30:12 +08:00
zzc98 7e4502b0ac
[Feature] Support InShop Dataset (Image Retrieval). (#1019)
* rebase

* feat: add inshop dataset (retrieval)

* update fileIO

* update unit tests

* fix windows ci

* fix windows ci

* fix lint

* update unit tests

* update docs

* update docs

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2023-01-18 17:16:54 +08:00
GAO SHIQI 353886eaca
[Docs] Add Chinese translation for runtime.md. (#1313)
* [Docs] Add Chinese translation for runtime.md

* [Docs] Update Chinese translation for runtime.md

* [Docs] Update for runtime.md

* [Docs] Update for runtime.md

* [Docs] Update for runtime.md
2023-01-18 17:15:43 +08:00
aso538 6b9e2b55dd
[Feature] Support LeViT backbone. (#1238)
* 网络搭建完成、能正常推理

* 网络搭建完成、能正常推理

* 网络搭建完成、能正常推理

* 添加了模型转换未验证,配置文件 但有无法运行

* 模型转换、结构验证完成,可以推理出正确答案

* 推理精度与原论文一致 已完成转化

* 三个方法改为class 暂存

* 完成推理精度对齐 误差0.04

* 暂时使用的levit2mmcls

* 训练跑通,训练相关参数未对齐

* '训练相关参数对齐'参数'

* '修复训练时验证导致模型结构改变无法复原问题'

* '修复训练时验证导致模型结构改变无法复原问题'

* '添加mixup和labelsmooth'

* '配置文件补齐'

* 添加模型转换

* 添加meta文件

* 添加meta文件

* 删除demo.py测试文件

* 添加模型README文件

* docs文件回滚

* model-index删除末行空格

* 更新模型metafile

* 更新metafile

* 更新metafile

* 更新README和metafile

* 更新模型README

* 更新模型metafile

* Delete the model class and get_LeViT_model methods in the mmcls.models.backone.levit file

* Change the class name to Google Code Style

* use arch to provide default architectures

* use nn.Conv2d

* mmcv.cnn.fuse_conv_bn

* modify some details

* remove down_ops from the architectures.

* remove init_weight function

* Modify ambiguous variable names

* Change the drop_path in config to drop_path_rate

* Add unit test

* remove train function

* add unit test

* modify nn.norm1d to build_norm_layer

* update metafile and readme

* Update configs and LeViT implementations.

* Update README.

* Add docstring and update unit tests.

* Revert irrelative modification.

* Fix unit tests

* minor fix

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-01-17 17:43:42 +08:00
szwlh-c c98dc4555c
[Feature] Support VIG Backbone. (#1304)
* 添加vig源文件

* 某些模块修改到mmcls风格

* 修改到mmcls风格

* 修改

* 添加VIG模型及源文件

* update model file

* update model file and config

* change class name and some variable name

* change class name and some variable name

* update

* update

* change nn.BatchNorm to mmcv.cnn.build_norm_layer

* update

* change nn.Seq to mmcls

* change backbone to stage_blocks

* add vig_head

* update

* update config file

* update

* add readme and metafile

* update model-index.yml

* update model file

* rename config file and add docstring

* variable rename

* update readme and metafile

* update readme

* update

* Update VIG backbone implementation and docs.

* Fix configs.

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-01-17 16:55:56 +08:00
Ma Zerun 97c4ae8805
[Improve] Update registries of mmcls. (#1306)
* [Improve] Update registries of mmcls.

* Update according to comments
2023-01-11 15:20:51 +08:00
Ma Zerun 060b0ed3b5
[Feature] Support ConvNeXt-V2 backbone. (#1294)
* [Feature] Support ConvNeXt-V2.

* Use registry of mmcls instead of mmengine.

* Add README.

* Add unit tests and docs.
2023-01-06 16:13:41 +08:00
Ma Zerun 0d8f918eaa
Bump version to v1.0.0rc5. (#1286) 2022-12-30 17:32:04 +08:00
Mr.Li 4f5350f365
[Doc] Fix typo. (#1281)
* [Fix] Fix imports in transforms. (#1255)

* fix import

* import from mmegine.utils

* 修复错别字

Co-authored-by: Xieyuan Zhang <25652281+Francis777@users.noreply.github.com>
2022-12-30 15:52:57 +08:00
QINGTIAN 74743ef588
[Feature] [CodeCamp #68] Add EfficientnetV2 Backbone. (#1253)
* add efficientnet_v2.py

* add efficientnet_v2 in __init__.py

* add efficientnet_v2_s base config file

* add efficientnet_v2 config file

* add efficientnet_v2 config file

* update tuple output

* update config file

* update model file

* update model file

* update model file

* update config file

* update model file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model file

* update config file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model config file

* Update efficientnet_v2.py

* add config file and modify arch

* add config file and modify arch

* add the file about convert_pth from timm to mmcls

* update efficientnetv2 model file with mmcls style

* add the file about convert_pth from timm to mmcls

* add the file about convert_pth from timm to mmcls

* update convert file

* update model file

* update convert file

* update model file

* update model file

* update model file

* add metefile and README

* Update tools/model_converters/efficientnetv2-timm_to_mmcls.py

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file

* update model file

* update model file

* update config file and README file

* update metafile

* Update efficientnetv2_to_mmcls.py

* update model-index.yml

* update metafile.yml

* update b0 and s train pipeline

* update b0 and s train pipeline

* update b0 and s train pipeline

* add test_efficientnet_v2

* update test_efficientnet_v2

* update model file docs

* update test_efficientnet_v2

* update test_efficientnet_v2

* add efficientnet_v2.py

* add efficientnet_v2 in __init__.py

* add efficientnet_v2_s base config file

* add efficientnet_v2 config file

* add efficientnet_v2 config file

* update tuple output

* update config file

* update model file

* update model file

* update model file

* update model file

* update config file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model file

* update config file

* update config file

* update model file

* update model file

* update model file

* update model file

* update model config file

* Update efficientnet_v2.py

* add config file and modify arch

* add config file and modify arch

* add the file about convert_pth from timm to mmcls

* update efficientnetv2 model file with mmcls style

* add the file about convert_pth from timm to mmcls

* add the file about convert_pth from timm to mmcls

* update convert file

* update model file

* update convert file

* update model file

* update model file

* update model file

* add metefile and README

* Update tools/model_converters/efficientnetv2-timm_to_mmcls.py

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file and convert file

* update model file

* update model file

* update model file

* update config file and README file

* update metafile

* Update efficientnetv2_to_mmcls.py

* update model-index.yml

* update metafile.yml

* update b0 and s train pipeline

* update b0 and s train pipeline

* update b0 and s train pipeline

* add test_efficientnet_v2

* update test_efficientnet_v2

* update model file docs

* update test_efficientnet_v2

* update test_efficientnet_v2

* pass pre-commit hook

* refactor efficientnetv2

* refactor efficientnetv2

* update readme, metafile and weight links

* update model-index.yml

* fix lint

* fix typo

* Update efficientnetv2-b1_8xb32_in1k.py

* Update efficientnetv2-b2_8xb32_in1k.py

* Update efficientnetv2-b3_8xb32_in1k.py

* update two moduals and model file

* update modual file

* update accuracys

* update accuracys

* update metafile

* fix build docs

* update links

* update README.md

Co-authored-by: qingtian <459291290@qq.com>
Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2022-12-30 15:18:39 +08:00
Ma Zerun b63515111b
[Reproduce] Update ConvNeXt config files. (#1256)
* Update ConvNeXt training configs.

* Update ConvNeXt network.

* Update metafile and README.

* Update README
2022-12-19 13:54:24 +08:00
Songyang Zhang 210373c093
[Feature] Implementation of RevViT. (#1127)
* [Feature] implement rev-vit network

* can reproduce the RevViT-Small accuracy 79.9

* update

* [Feature] update revvit

* [Feature] update revvit readme

* Update links

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-12-14 11:46:39 +08:00
mzr1996 458ac4c89a Merge remote-tracking branch 'origin/dev-1.x' into 1.x 2022-12-06 18:00:59 +08:00
Ma Zerun 12eca5b94a
Bump version to v1.0.0rc4. (#1243)
* Bump version to v1.0.0rc4

* Update according to comments
2022-12-06 18:00:01 +08:00
Ma Zerun a4ec2799d6
[Docs] Update install tutorial. (#1223)
* [Docs] Update install tutorial.

* Update collapsed sections.

* Update requirements

* Update install tutorial.
2022-12-06 17:00:32 +08:00
Ma Zerun c127c474b9
[Feature] Support getting model from the name defined in the model-index file. (#1236)
* [Feature] Support getting model from the name defined in the model-index file.

* Add unit tests.

* Prevent import `timm` if the `TIMMBackbone` is not used.

* Fix Windows CI.

* Move `init_model` to `mmcls.apis.hub`, and support pass nn.Module to all
model components.

* Fix requirements

* Rename `hub.py` to `model.py` and add unit tests.
2022-12-06 17:00:22 +08:00
Ma Zerun 7b9a1010f5
[Enhance] Support evaluate on both EMA and non-EMA models. (#1204)
* [Enhance] Support evaluate on both EMA and original models.

* Fix lint
2022-12-05 14:16:12 +08:00
Yixiao Fang d80ec5a4b8
[Refactor] Refactor BEiT backbone and support v1/v2 inference. (#1144)
* refactor beit backbone

* use LinearClsHead

* fix mean and std value

* fix lint

* support inference if beit-v2

* update encoder layer and init

* update

* add ut

* add prepare_relative_position_bias_table function

* add cls_token

* fix lint

* add pos_embed check

* update metafile and readme

* update weights link

* update link of weights

* update metafile

* update

* update docstrings

* update according to review

* rename readme

* update docstring

* fix lint
2022-11-29 12:56:33 +08:00
Ma Zerun f9be21ab74
[Docs] Add version selection in the banner. (#1217)
* [Docs] Add version selection in the banner.

* Small fix.
2022-11-23 13:38:23 +08:00
mzr1996 75e502ed75 Update Chinese translation. 2022-11-22 15:19:03 +08:00
mzr1996 a4cfd55dd2 Update chinese translation. 2022-11-22 11:39:49 +08:00
mzr1996 44d2886422 [Docs] Add some Chinese translation for API pages. 2022-11-22 09:49:39 +08:00
Ma Zerun 13ff394985
Bump version to v1.0.0rc3. (#1211)
* Bump version to v1.0.0rc3

* Update pre-commit hook
2022-11-21 18:21:48 +08:00
Ezra-Yu b0007812d6
[Enhance] Enhance ArcFaceClsHead. (#1181)
* update arcface

* fix unit tests

* add adv-margins

add adv-margins

update arcface

* rebase

* update doc and fix ut

* rebase

* update code

* rebase

* use label data

* update set-margins

* Modify Arcface related method names.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-21 18:10:39 +08:00
marouane amzil 743ca2d602
[Fix] Fix the torchserve. (#1143)
* rebase

* update docker and rm deprecated deployment tools

* update docs

* rebase

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2022-11-21 11:18:42 +08:00
Hubert 629f6447ef
[Feature] Migrate CSRA head to 1.x. (#1177)
* [Feat] add csra to 1x

* minor fix

* add voc metrics

* refine

* add unittest

* minor fix

* add more comments

* Fix docs and metafile.

* Fix docs.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-21 10:39:16 +08:00
Ma Zerun 0e8cfa6286
[Docs] Add not-found page extension. (#1207)
* [Docs] Add not-found page extension.

* Mock rich during generate docs.

* Fix multiple broken links in docs.

* Fix "right" to "left".
2022-11-21 10:34:05 +08:00
Jiahao Wang 72c6bc4864
[Feature] Support RepLKnet backbone. (#1129)
* update replknet configs

* update replknet test

* update replknet model

* update replknet model

* update replknet model

* update replknet model

* Fix docs and config names

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-21 10:18:58 +08:00
Ezra-Yu c3c1cb93aa
[Feature] Add Switch Recipe Hook. (#1101)
* add switch hook and UTs

* update doc

* update doc

* fix lint

* fix ci

* fix ci

* fix typo

* fix ci

* switchTrainAugHook to switchRecipeHook

* fix lint

* Refactor the `SwitchRecipeHook`.

* Fix windows CI

* Fix windows CI

* Fix windows CI.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-18 18:12:03 +08:00
Songyang Zhang f458bf5a64
[Docs] update visualization doc. (#1160)
* [Docs] update visualization doc

* update doc

* update folder

* update analysis

* Update print config tool

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-18 12:44:55 +08:00
takuoko c4f3883a22
[Feature] Support DaViT. (#1105)
* add davit

* fix mixup config

* convert scripts

* lint

* test

* test

* Add checkpoint links.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-16 17:23:55 +08:00
Ma Zerun 542143cb41
[Feature] Add TIMM and HuggingFace wrappers to build classifiers from them directly. (#1102)
* [Feature] Add TIMM and HuggingFace wrappers to build classifiers from them directly.

* Support `with_cp` and add docstring.

* Add unit tests.

* Update CI.

* Update docs.
2022-11-10 14:56:19 +08:00
Ma Zerun 2151beeb77
[Docs] Support sort and search the Model Summary table. (#1100)
* [Docs] Support sort and search the Model Summary table.

* Add description.

* Fix according to comments
2022-11-08 12:03:06 +08:00
Ma Zerun c48cfa9f47
[Docs] Improve the ResNet model page. (#1118)
* [Docs] Improve the ResNet model page.

* Fix lint.

* Update stat.py
2022-11-08 11:09:51 +08:00
takuoko d05cbbcf9b
[Feature] Support HorNet Backbone for dev1.x. (#1094)
* add hornet

* add hornet

* fix mixup config

* add optim cfgs

Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com>
2022-11-04 15:33:46 +08:00
Ezra-Yu 63b124e2d7
[Docs] Improve Swin Doc and Add Tabs enxtation. (#1145)
* improve_swin_doc

* fix requirments

* improve swin2 docs

* improve swin2 docs

* update

* update CN doc

* update CN doc

* update comments

* fix error

* update register_all_modules

* Update README.md

* Update stat.py

* Update readme

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-04 11:58:39 +08:00
Ma Zerun 29c46c8af2
[Docs] Add runtime configuration docs. (#1128)
* [Docs] Add runtime configuration docs.

* Fix grammar errors.

* Imporve docs according to comments
2022-11-02 10:59:59 +08:00
Hubert 50aaa711ea
[Docs] Add custom evaluation docs (#1130)
* [Docs] Add evaluation docs

* minor fix

* Fix docs.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-01 18:54:06 +08:00
Ma Zerun 280e916979
[Docs] Add custom pipeline docs. (#1124)
* [Docs] Add custom pipeline docs.

* Fix link.

* Fix according to comments
2022-10-27 10:35:20 +08:00
Hubert bcca619066
[Feature] Support MobileViT backbone. (#1068)
* init

* fix

* add config

* add meta

* add unittest

* fix for comments

* Imporvee docstring and support custom arch.

* Update README

* Update windows CI

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-10-18 17:05:59 +08:00
Ma Zerun 29f066f7fb
[Improve] Speed up data preprocessor. (#1064)
* [Improve] Speed up data preprocessor.

* Add ClsDataSample serialization override functions.

* Add unit tests

* Modify configs to fit new mixup args.

* Fix `num_classes` of the ImageNet-21k config.

* Update docs.
2022-10-17 17:08:18 +08:00
Ma Zerun 31c67ffed4
Bump version to v1.0.0rc2. (#1084) 2022-10-12 16:52:31 +08:00
takuoko a49c3076e1
[Feature] Support DeiT3. (#1065)
* deit3

deit3

lint

* add tools and test

* deit3

* deit3

* fix preprocess

* lint

* Update config names and checkpoint paths

* Update convert tools to use mmengine, and fix docstring.

Co-authored-by: mzr1996 <mzr1996@163.com>
2022-10-10 14:54:20 +08:00