diff --git a/.dev_scripts/benchmark_options.py b/.dev_scripts/benchmark_options.py deleted file mode 100644 index a55c6a47449..00000000000 --- a/.dev_scripts/benchmark_options.py +++ /dev/null @@ -1,10 +0,0 @@ -third_part_libs = [ - 'pip install -r ../requirements.txt', -] - -default_floating_range = 0.2 -model_floating_ranges = { - 'blip/blip-base_8xb32_retrieval.py': 1.0, - 'blip2/blip2-opt2.7b_8xb32_caption.py': 1.0, - 'ofa/ofa-base_finetuned_caption.py': 1.0, -} diff --git a/.dev_scripts/benchmark_regression/bench_test.yml b/.dev_scripts/benchmark_regression/bench_test.yml index cd8568ca2e4..d92bc69a39c 100644 --- a/.dev_scripts/benchmark_regression/bench_test.yml +++ b/.dev_scripts/benchmark_regression/bench_test.yml @@ -1,7 +1,7 @@ - Name: convnext-base_32xb128_in1k - Name: convnext-v2-atto_fcmae-pre_3rdparty_in1k - Name: mobilenet-v2_8xb32_in1k -- Name: mobilenet-v3-small-050_8xb128_in1k +- Name: mobilenet-v3-small-050_3rdparty_in1k - Name: swin-tiny_16xb64_in1k - Name: swinv2-tiny-w8_3rdparty_in1k-256px - Name: vit-base-p16_32xb128-mae_in1k diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 1789bcba40d..00000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: deploy - -on: push - -jobs: - build-n-publish: - runs-on: ubuntu-latest - if: startsWith(github.event.ref, 'refs/tags') - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.7 - uses: actions/setup-python@v4 - with: - python-version: 3.7 - - name: Build MMPretrain - run: | - pip install wheel - python setup.py sdist bdist_wheel - - name: Publish distribution to PyPI - run: | - pip install twine - twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }} diff --git a/README.md b/README.md index 905d6a4d864..84124bbb0cc 100644 --- a/README.md +++ b/README.md @@ -86,28 +86,25 @@ https://github.com/open-mmlab/mmpretrain/assets/26739999/e4dcd3a2-f895-4d1b-a351 ## What's new +🌟 v1.0.0 was released in 04/07/2023 + +- Support inference of more **multi-modal** algorithms, such as [**LLaVA**](./configs/llava/), [**MiniGPT-4**](./configs/minigpt4), [**Otter**](./configs/otter/), etc. +- Support around **10 multi-modal** datasets! +- Add [**iTPN**](./configs/itpn/), [**SparK**](./configs/spark/) self-supervised learning algorithms. +- Provide examples of [New Config](./mmpretrain/configs/) and [DeepSpeed/FSDP with FlexibleRunner](./configs/mae/benchmarks/). Here are the documentation links of [New Config](https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#a-pure-python-style-configuration-file-beta) and [DeepSpeed/FSDP with FlexibleRunner](https://mmengine.readthedocs.io/en/latest/api/generated/mmengine.runner.FlexibleRunner.html#mmengine.runner.FlexibleRunner). + 🌟 v1.0.0rc8 was released in 22/05/2023 - Support multiple **multi-modal** algorithms and inferencers. You can explore these features by the [gradio demo](https://github.com/open-mmlab/mmpretrain/tree/main/projects/gradio_demo)! - Add EVA-02, Dino-V2, ViT-SAM and GLIP backbones. - Register torchvision transforms into MMPretrain, you can now easily integrate torchvision's data augmentations in MMPretrain. See [the doc](https://mmpretrain.readthedocs.io/en/latest/api/data_process.html#torchvision-transforms) -🌟 v1.0.0rc7 was released in 07/04/2023 +Update of previous versions - Integrated Self-supervised learning algorithms from **MMSelfSup**, such as **MAE**, **BEiT**, etc. - Support **RIFormer**, a simple but effective vision backbone by removing token mixer. -- Add t-SNE visualization. - Refactor dataset pipeline visualization. - -Update of previous versions - - Support **LeViT**, **XCiT**, **ViG**, **ConvNeXt-V2**, **EVA**, **RevViT**, **EfficientnetV2**, **CLIP**, **TinyViT** and **MixMIM** backbones. -- Reproduce the training accuracy of **ConvNeXt** and **RepVGG**. -- Support confusion matrix calculation and plot. -- Support **multi-task** training and testing. -- Support Test-time Augmentation. -- Upgrade API to get pre-defined models of MMPreTrain. -- Refactor BEiT backbone and support v1/v2 inference. This release introduced a brand new and flexible training & test engine, but it's still in progress. Welcome to try according to [the documentation](https://mmpretrain.readthedocs.io/en/latest/). @@ -224,6 +221,10 @@ Results and models are available in the [model zoo](https://mmpretrain.readthedo
  • LeViT
  • RIFormer
  • GLIP
  • +
  • ViT SAM
  • +
  • EVA02
  • +
  • DINO V2
  • +
  • HiViT
  • @@ -246,6 +247,8 @@ Results and models are available in the [model zoo](https://mmpretrain.readthedo
  • BEiT V2 (arXiv'2022)
  • EVA (CVPR'2023)
  • MixMIM (arXiv'2022)
  • +
  • iTPN (CVPR'2023)
  • +
  • SparK (ICLR'2023)
  • diff --git a/README_zh-CN.md b/README_zh-CN.md index 10a9835571e..e0f79fb9e4a 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -84,28 +84,25 @@ https://github.com/open-mmlab/mmpretrain/assets/26739999/e4dcd3a2-f895-4d1b-a351 ## 更新日志 +🌟 2023/7/4 发布了 v1.0.0 版本 + +- 支持更多**多模态**算法的推理, 例如 [**LLaVA**](./configs/llava/), [**MiniGPT-4**](./configs/minigpt4), [**Otter**](./configs/otter/) 等。 +- 支持约 **10 个多模态**数据集! +- 添加自监督学习算法 [**iTPN**](./configs/itpn/), [**SparK**](./configs/spark/)。 +- 提供[新配置文件](./mmpretrain/configs/)和 [DeepSpeed/FSDP](./configs/mae/benchmarks/) 的样例。这是[新配置文件](https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#a-pure-python-style-configuration-file-beta) 和 [DeepSpeed/FSDP with FlexibleRunner](https://mmengine.readthedocs.io/en/latest/api/generated/mmengine.runner.FlexibleRunner.html#mmengine.runner.FlexibleRunner) 的文档链接。 + 🌟 2023/5/22 发布了 v1.0.0rc8 版本 - 支持多种多模态算法和推理器。您可以通过 [gradio demo](https://github.com/open-mmlab/mmpretrain/tree/main/projects/gradio_demo) 探索这些功能! - 新增 EVA-02,Dino-V2,ViT-SAM 和 GLIP 主干网络。 - 将 torchvision 变换注册到 MMPretrain,现在您可以轻松地将 torchvision 的数据增强集成到 MMPretrain 中。 -🌟 2023/4/7 发布了 v1.0.0rc7 版本 +之前版本更新内容 - 整和来自 MMSelfSup 的自监督学习算法,例如 `MAE`, `BEiT` 等 - 支持了 **RIFormer**,简单但有效的视觉主干网络,却移除了 token mixer -- 支持 t-SNE 可视化 - 重构数据管道可视化 - -之前版本更新内容 - - 支持了 **LeViT**, **XCiT**, **ViG**, **ConvNeXt-V2**, **EVA**, **RevViT**, **EfficientnetV2**, **CLIP**, **TinyViT** 和 **MixMIM** 等骨干网络结构 -- 复现了 ConvNeXt 和 RepVGG 的训练精度。 -- 支持混淆矩阵计算和画图。 -- 支持了 **多任务** 训练和测试。 -- 支持了测试时增强(TTA)。 -- 更新了主要 API 接口,用以方便地获取 MMPreTrain 中预定义的模型。 -- 重构 BEiT 主干网络结构,并支持 v1 和 v2 模型的推理。 这个版本引入一个全新的,可扩展性强的训练和测试引擎,但目前仍在开发中。欢迎根据 [文档](https://mmpretrain.readthedocs.io/zh_CN/latest/) 进行试用。 @@ -220,6 +217,10 @@ mim install -e ".[multimodal]"
  • LeViT
  • RIFormer
  • GLIP
  • +
  • ViT SAM
  • +
  • EVA02
  • +
  • DINO V2
  • +
  • HiViT
  • @@ -242,6 +243,8 @@ mim install -e ".[multimodal]"
  • BEiT V2 (arXiv'2022)
  • EVA (CVPR'2023)
  • MixMIM (arXiv'2022)
  • +
  • iTPN (CVPR'2023)
  • +
  • SparK (ICLR'2023)
  • diff --git a/configs/mae/benchmarks/vit-huge-p14_8xb128-ds-coslr-50e_in1k.py b/configs/mae/benchmarks/vit-huge-p14_8xb128-ds-coslr-50e_in1k.py index 474da1a6dae..813f7c03f30 100644 --- a/configs/mae/benchmarks/vit-huge-p14_8xb128-ds-coslr-50e_in1k.py +++ b/configs/mae/benchmarks/vit-huge-p14_8xb128-ds-coslr-50e_in1k.py @@ -4,7 +4,6 @@ optim_wrapper = dict(type='DeepSpeedOptimWrapper') # training strategy -# Deepspeed with ZeRO3 + fp16 strategy = dict( type='DeepSpeedStrategy', fp16=dict( diff --git a/configs/mae/benchmarks/vit-large-p16_8xb128-ds-coslr-50e_in1k.py b/configs/mae/benchmarks/vit-large-p16_8xb128-ds-coslr-50e_in1k.py index 12d4acc84b6..9aedb431c55 100644 --- a/configs/mae/benchmarks/vit-large-p16_8xb128-ds-coslr-50e_in1k.py +++ b/configs/mae/benchmarks/vit-large-p16_8xb128-ds-coslr-50e_in1k.py @@ -4,7 +4,6 @@ optim_wrapper = dict(type='DeepSpeedOptimWrapper') # training strategy -# Deepspeed with ZeRO3 + fp16 strategy = dict( type='DeepSpeedStrategy', fp16=dict( diff --git a/docs/en/notes/changelog.md b/docs/en/notes/changelog.md index de68e1d8610..219797b4f8f 100644 --- a/docs/en/notes/changelog.md +++ b/docs/en/notes/changelog.md @@ -1,5 +1,59 @@ # Changelog (MMPreTrain) +## v1.0.0(04/07/2023) + +### Highlights + +- Support inference of more **multi-modal** algorithms, such as **LLaVA**, **MiniGPT-4**, **Otter**, etc. +- Support around **10 multi-modal datasets**! +- Add **iTPN**, **SparK** self-supervised learning algorithms. +- Provide examples of [New Config](./mmpretrain/configs/) and [DeepSpeed/FSDP](./configs/mae/benchmarks/). + +### New Features + +- Transfer shape-bias tool from mmselfsup ([#1658](https://github.com/open-mmlab/mmpretrain/pull/1685)) +- Download dataset by using MIM&OpenDataLab ([#1630](https://github.com/open-mmlab/mmpretrain/pull/1630)) +- Support New Configs ([#1639](https://github.com/open-mmlab/mmpretrain/pull/1639), [#1647](https://github.com/open-mmlab/mmpretrain/pull/1647), [#1665](https://github.com/open-mmlab/mmpretrain/pull/1665)) +- Support Flickr30k Retrieval dataset ([#1625](https://github.com/open-mmlab/mmpretrain/pull/1625)) +- Support SparK ([#1531](https://github.com/open-mmlab/mmpretrain/pull/1531)) +- Support LLaVA ([#1652](https://github.com/open-mmlab/mmpretrain/pull/1652)) +- Support Otter ([#1651](https://github.com/open-mmlab/mmpretrain/pull/1651)) +- Support MiniGPT-4 ([#1642](https://github.com/open-mmlab/mmpretrain/pull/1642)) +- Add support for VizWiz dataset ([#1636](https://github.com/open-mmlab/mmpretrain/pull/1636)) +- Add support for vsr dataset ([#1634](https://github.com/open-mmlab/mmpretrain/pull/1634)) +- Add InternImage Classification project ([#1569](https://github.com/open-mmlab/mmpretrain/pull/1569)) +- Support OCR-VQA dataset ([#1621](https://github.com/open-mmlab/mmpretrain/pull/1621)) +- Support OK-VQA dataset ([#1615](https://github.com/open-mmlab/mmpretrain/pull/1615)) +- Support TextVQA dataset ([#1569](https://github.com/open-mmlab/mmpretrain/pull/1569)) +- Support iTPN and HiViT ([#1584](https://github.com/open-mmlab/mmpretrain/pull/1584)) +- Add retrieval mAP metric ([#1552](https://github.com/open-mmlab/mmpretrain/pull/1552)) +- Support NoCap dataset based on BLIP. ([#1582](https://github.com/open-mmlab/mmpretrain/pull/1582)) +- Add GQA dataset ([#1585](https://github.com/open-mmlab/mmpretrain/pull/1585)) + +### Improvements + +- Update fsdp vit-huge and vit-large config ([#1675](https://github.com/open-mmlab/mmpretrain/pull/1675)) +- Support deepspeed with flexible runner ([#1673](https://github.com/open-mmlab/mmpretrain/pull/1673)) +- Update Otter and LLaVA docs and config. ([#1653](https://github.com/open-mmlab/mmpretrain/pull/1653)) +- Add image_only param of ScienceQA ([#1613](https://github.com/open-mmlab/mmpretrain/pull/1613)) +- Support to use "split" to specify training set/validation ([#1535](https://github.com/open-mmlab/mmpretrain/pull/1535)) + +### Bug Fixes + +- Refactor \_prepare_pos_embed in ViT ([#1656](https://github.com/open-mmlab/mmpretrain/pull/1656), [#1679](https://github.com/open-mmlab/mmpretrain/pull/1679)) +- Freeze pre norm in vision transformer ([#1672](https://github.com/open-mmlab/mmpretrain/pull/1672)) +- Fix bug loading IN1k dataset ([#1641](https://github.com/open-mmlab/mmpretrain/pull/1641)) +- Fix sam bug ([#1633](https://github.com/open-mmlab/mmpretrain/pull/1633)) +- Fixed circular import error for new transform ([#1609](https://github.com/open-mmlab/mmpretrain/pull/1609)) +- Update torchvision transform wrapper ([#1595](https://github.com/open-mmlab/mmpretrain/pull/1595)) +- Set default out_type in CAM visualization ([#1586](https://github.com/open-mmlab/mmpretrain/pull/1586)) + +### Docs Update + +- Fix spelling ([#1681](https://github.com/open-mmlab/mmpretrain/pull/1681)) +- Fix doc typos ([#1671](https://github.com/open-mmlab/mmpretrain/pull/1671), [#1644](https://github.com/open-mmlab/mmpretrain/pull/1644), [#1629](https://github.com/open-mmlab/mmpretrain/pull/1629)) +- Add t-SNE visualization doc ([#1555](https://github.com/open-mmlab/mmpretrain/pull/1555)) + ## v1.0.0rc8(22/05/2023) ### Highlights diff --git a/docs/en/notes/faq.md b/docs/en/notes/faq.md index 12566016f7d..64d0ee23c4a 100644 --- a/docs/en/notes/faq.md +++ b/docs/en/notes/faq.md @@ -16,7 +16,8 @@ and make sure you fill in all required information in the template. | MMPretrain version | MMEngine version | MMCV version | | :----------------: | :---------------: | :--------------: | - | 1.0.0rc8 (main) | mmengine >= 0.7.1 | mmcv >= 2.0.0rc4 | + | 1.0.0 (main) | mmengine >= 0.8.0 | mmcv >= 2.0.0 | + | 1.0.0rc8 | mmengine >= 0.7.1 | mmcv >= 2.0.0rc4 | | 1.0.0rc7 | mmengine >= 0.5.0 | mmcv >= 2.0.0rc4 | ```{note} diff --git a/docs/zh_CN/notes/faq.md b/docs/zh_CN/notes/faq.md index 744cd3fcbf0..c0b3c117d1d 100644 --- a/docs/zh_CN/notes/faq.md +++ b/docs/zh_CN/notes/faq.md @@ -13,7 +13,8 @@ | MMPretrain 版本 | MMEngine 版本 | MMCV 版本 | | :-------------: | :---------------: | :--------------: | - | 1.0.0rc8 (main) | mmengine >= 0.7.1 | mmcv >= 2.0.0rc4 | + | 1.0.0 (main) | mmengine >= 0.8.0 | mmcv >= 2.0.0 | + | 1.0.0rc8 | mmengine >= 0.7.1 | mmcv >= 2.0.0rc4 | | 1.0.0rc7 | mmengine >= 0.5.0 | mmcv >= 2.0.0rc4 | ```{note} diff --git a/mmpretrain/__init__.py b/mmpretrain/__init__.py index 3e17a3701d9..1d065db1cd8 100644 --- a/mmpretrain/__init__.py +++ b/mmpretrain/__init__.py @@ -6,11 +6,11 @@ from .apis import * # noqa: F401, F403 from .version import __version__ -mmcv_minimum_version = '2.0.0rc4' +mmcv_minimum_version = '2.0.0' mmcv_maximum_version = '2.1.0' mmcv_version = digit_version(mmcv.__version__) -mmengine_minimum_version = '0.7.3' +mmengine_minimum_version = '0.8.0' mmengine_maximum_version = '1.0.0' mmengine_version = digit_version(mmengine.__version__) diff --git a/mmpretrain/version.py b/mmpretrain/version.py index 1d684c9c1ab..6a60b40f31d 100644 --- a/mmpretrain/version.py +++ b/mmpretrain/version.py @@ -1,6 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved -__version__ = '1.0.0rc8' +__version__ = '1.0.0' def parse_version_info(version_str): diff --git a/requirements/mminstall.txt b/requirements/mminstall.txt index b114d404c58..53ce8aa3d6f 100644 --- a/requirements/mminstall.txt +++ b/requirements/mminstall.txt @@ -1,2 +1,2 @@ -mmcv>=2.0.0rc4,<2.1.0 -mmengine>=0.7.3,<1.0.0 +mmcv>=2.0.0,<2.1.0 +mmengine>=0.8.0,<1.0.0