diff --git a/README.md b/README.md index bca5088b2..e2f493d8b 100644 --- a/README.md +++ b/README.md @@ -66,13 +66,12 @@ This project is released under the [Apache 2.0 license](LICENSE). ## ChangeLog -MMSelfSup **v0.8.0** was released in 31/03/2022. +MMSelfSup **v0.9.0** was released in 29/04/2022. Highlights of the new version: -* Support **SimMIM** -* Add **KNN** benchmark, support KNN test with checkpoint and extracted backbone weights -* Support ImageNet-21k dataset +* Support **CAE** +* Support **Barlow Twins** Please refer to [changelog.md](docs/en/changelog.md) for details and release history. @@ -123,7 +122,7 @@ More algorithms are in our plan. ## Installation -MMSelfSup depends on [PyTorch](https://pytorch.org/)], [MMCV](https://github.com/open-mmlab/mmcv) and [MMClassification](https://github.com/open-mmlab/mmclassification). +MMSelfSup depends on [PyTorch](https://pytorch.org/), [MMCV](https://github.com/open-mmlab/mmcv) and [MMClassification](https://github.com/open-mmlab/mmclassification). Please refer to [install.md](docs/en/install.md) for more detailed instruction. diff --git a/README_zh-CN.md b/README_zh-CN.md index 06d9da30e..35631f512 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -64,13 +64,12 @@ MMSelfSup 是一个基于 PyTorch 实现的开源自监督表征学习工具箱 ## 更新日志 -最新的 **v0.8.0** 版本已经在 2022.03.31 发布。 +最新的 **v0.9.0** 版本已经在 2022.04.29 发布。 新版本亮点: -* 支持 **SimMIM** -* 增加 **KNN** 基准测试,支持中间 checkpoint 和提取的 backbone 权重进行评估 -* 支持 ImageNet-21k 数据集 +* 支持 **CAE** +* 支持 **Barlow Twins** 请参考 [更新日志](docs/zh_cn/changelog.md) 获取更多细节和历史版本信息。 @@ -100,6 +99,7 @@ MMSelfSup 和 OpenSelfSup 的不同点写在 [对比文档](docs/en/compatibilit - [x] [MoCo v3 (ICCV'2021)](https://arxiv.org/abs/2104.02057) - [x] [MAE](https://arxiv.org/abs/2111.06377) - [x] [SimMIM](https://arxiv.org/abs/2111.09886) +- [x] [CAE](https://arxiv.org/abs/2202.03026) 更多的算法实现已经在我们的计划中。 @@ -121,7 +121,7 @@ MMSelfSup 和 OpenSelfSup 的不同点写在 [对比文档](docs/en/compatibilit ## 安装 -MMSelfSup 依赖 [PyTorch](https://pytorch.org/)], [MMCV](https://github.com/open-mmlab/mmcv) 和 [MMClassification](https://github.com/open-mmlab/mmclassification). +MMSelfSup 依赖 [PyTorch](https://pytorch.org/), [MMCV](https://github.com/open-mmlab/mmcv) 和 [MMClassification](https://github.com/open-mmlab/mmclassification). 请参考 [安装文档](docs/zh_cn/install.md) 获取更详细的安装指南。 diff --git a/docs/en/changelog.md b/docs/en/changelog.md index 531ad06e8..748424e8a 100644 --- a/docs/en/changelog.md +++ b/docs/en/changelog.md @@ -2,6 +2,34 @@ ## MMSelfSup +### v0.9.0 (29/04/2022) + +#### Highlight +* Support **CAE** ([#284](https://github.com/open-mmlab/mmselfsup/pull/284)) +* Support **Barlow Twins** ([#207](https://github.com/open-mmlab/mmselfsup/pull/207)) + +#### New Features +* Support CAE ([#284](https://github.com/open-mmlab/mmselfsup/pull/284)) +* Support Barlow twins ([#207](https://github.com/open-mmlab/mmselfsup/pull/207)) +* Add SimMIM 192 pretrain and 224 fine-tuning results ([#280](https://github.com/open-mmlab/mmselfsup/pull/280)) +* Add MAE pretrain with fp16 ([#271](https://github.com/open-mmlab/mmselfsup/pull/271)) + +#### Bug Fixes +* Fix args error ([#290](https://github.com/open-mmlab/mmselfsup/pull/290)) +* Change imgs_per_gpu to samples_per_gpu in MAE config ([#278](https://github.com/open-mmlab/mmselfsup/pull/278)) +* Avoid GPU memory leak with prefetch dataloader ([#277](https://github.com/open-mmlab/mmselfsup/pull/277)) +* Fix key error bug when registering custom hooks ([#273](https://github.com/open-mmlab/mmselfsup/pull/273)) + +#### Improvements +* Update SimCLR models and results ([#295](https://github.com/open-mmlab/mmselfsup/pull/295)) +* Reduce memory usage while running unit test ([#291](https://github.com/open-mmlab/mmselfsup/pull/291)) +* Remove pytorch1.5 test ([#288](https://github.com/open-mmlab/mmselfsup/pull/288)) +* Rename linear probing config file names ([#281](https://github.com/open-mmlab/mmselfsup/pull/281)) +* add unit test for apis ([#276](https://github.com/open-mmlab/mmselfsup/pull/276)) + +#### Docs +* Fix SimMIM config link, and add SimMIM to model_zoo ([#272](https://github.com/open-mmlab/mmselfsup/pull/272)) + ### v0.8.0 (31/03/2022) #### Highlight diff --git a/docs/en/install.md b/docs/en/install.md index 0fa627aa9..49807ce4e 100644 --- a/docs/en/install.md +++ b/docs/en/install.md @@ -7,8 +7,8 @@ - PyTorch 1.5+ - CUDA 9.2+ - GCC 5+ -- [mmcv](https://github.com/open-mmlab/mmcv) 1.3.16+ -- [mmcls](https://mmclassification.readthedocs.io/en/latest/install.html) 0.19.0+ +- [mmcv](https://github.com/open-mmlab/mmcv) 1.4.2+ +- [mmcls](https://mmclassification.readthedocs.io/en/latest/install.html) 0.21.0+ - [mmdet](https://mmdetection.readthedocs.io/en/latest/get_started.html#installation) 2.16.0+ - [mmseg](https://mmsegmentation.readthedocs.io/en/latest/get_started.html#installation) 0.20.2+ @@ -16,7 +16,8 @@ Compatible MMCV, MMClassification, MMDetection and MMSegmentation versions are s | MMSelfSup version | MMCV version | MMClassification version | MMSegmentation version | MMDetection version | | :---------------: | :-----------------: | :------------------------: | :--------------------: | :-----------------: | -| 0.8.0 (master) | mmcv-full >= 1.3.16 | mmcls >= 0.21.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | +| 0.9.0 (master) | mmcv-full >= 1.4.2 | mmcls >= 0.21.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | +| 0.8.0 | mmcv-full >= 1.4.2 | mmcls >= 0.21.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | | 0.7.1 | mmcv-full >= 1.3.16 | mmcls >= 0.19.0, <= 0.20.1 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | | 0.6.0 | mmcv-full >= 1.3.16 | mmcls >= 0.19.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | | 0.5.0 | mmcv-full >= 1.3.16 | / | mmseg >= 0.20.2 | mmdet >= 2.16.0 | diff --git a/docs/zh_cn/changelog.md b/docs/zh_cn/changelog.md index b9aa60ecd..9e8f90d58 100644 --- a/docs/zh_cn/changelog.md +++ b/docs/zh_cn/changelog.md @@ -2,6 +2,34 @@ ## MMSelfSup +### v0.9.0 (29/04/2022) + +#### 亮点 +* 支持 **CAE** ([#284](https://github.com/open-mmlab/mmselfsup/pull/284)) +* 支持 **Barlow Twins** ([#207](https://github.com/open-mmlab/mmselfsup/pull/207)) + +#### 新特性 +* 支持 CAE ([#284](https://github.com/open-mmlab/mmselfsup/pull/284)) +* 支持 Barlow twins ([#207](https://github.com/open-mmlab/mmselfsup/pull/207)) +* 增加 SimMIM 192 预训练及 224 微调的结果 ([#280](https://github.com/open-mmlab/mmselfsup/pull/280)) +* 增加 MAE fp16 预训练设置 ([#271](https://github.com/open-mmlab/mmselfsup/pull/271)) + +#### Bug 修复 +* 修复参数问题 ([#290](https://github.com/open-mmlab/mmselfsup/pull/290)) +* 在 MAE 配置中修改 imgs_per_gpu 为 samples_per_gpu ([#278](https://github.com/open-mmlab/mmselfsup/pull/278)) +* 使用 prefetch dataloader 时避免 GPU 内存溢出 ([#277](https://github.com/open-mmlab/mmselfsup/pull/277)) +* 修复在注册自定义钩子时键值错误的问题 ([#273](https://github.com/open-mmlab/mmselfsup/pull/273)) + +#### 改进 +* 更新 SimCLR 模型和结果 ([#295](https://github.com/open-mmlab/mmselfsup/pull/295)) +* 单元测试减少内存使用 ([#291](https://github.com/open-mmlab/mmselfsup/pull/291)) +* 去除 pytorch 1.5 测试 ([#288](https://github.com/open-mmlab/mmselfsup/pull/288)) +* 重命名线性评估配置文件 ([#281](https://github.com/open-mmlab/mmselfsup/pull/281)) +* 为 api 增加单元测试 ([#276](https://github.com/open-mmlab/mmselfsup/pull/276)) + +#### 文档 +* 在模型库增加 SimMIM 并修复链接 ([#272](https://github.com/open-mmlab/mmselfsup/pull/272)) + ### v0.8.0 (31/03/2022) #### 亮点 @@ -9,24 +37,24 @@ * 增加 **KNN** 基准测试,支持中间 checkpoint 和提取的 backbone 权重进行评估 ([#243](https://github.com/open-mmlab/mmselfsup/pull/243)) * 支持 ImageNet-21k 数据集 ([#225](https://github.com/open-mmlab/mmselfsup/pull/225)) -#### New Features +#### 新特性 * 支持 SimMIM ([#239](https://github.com/open-mmlab/mmselfsup/pull/239)) * 增加 KNN 基准测试,支持中间 checkpoint 和提取的 backbone 权重进行评估 ([#243](https://github.com/open-mmlab/mmselfsup/pull/243)) * 支持 ImageNet-21k 数据集 ([#225](https://github.com/open-mmlab/mmselfsup/pull/225)) * 支持自动继续 checkpoint 文件的训练 ([#245](https://github.com/open-mmlab/mmselfsup/pull/245)) -#### Bug Fixes +#### Bug 修复 * 在分布式 sampler 中增加种子 ([#250](https://github.com/open-mmlab/mmselfsup/pull/250)) * 修复 dist_test_svm_epoch.sh 中参数位置问题 ([#260](https://github.com/open-mmlab/mmselfsup/pull/260)) * 修复 prepare_voc07_cls.sh 中 mkdir 潜在错误 ([#261](https://github.com/open-mmlab/mmselfsup/pull/261)) -#### Improvements +#### 改进 * 更新命令行参数模式 ([#253](https://github.com/open-mmlab/mmselfsup/pull/253)) -#### Docs +#### 文档 * 修复 6_benchmarks.md 中命令文档([#263](https://github.com/open-mmlab/mmselfsup/pull/263)) * 翻译 6_benchmarks.md 到中文 ([#262](https://github.com/open-mmlab/mmselfsup/pull/262)) -* + ### v0.7.0 (03/03/2022) #### 亮点 diff --git a/docs/zh_cn/install.md b/docs/zh_cn/install.md index 927a843d7..e857db8ce 100644 --- a/docs/zh_cn/install.md +++ b/docs/zh_cn/install.md @@ -7,8 +7,8 @@ - PyTorch 1.5+ - CUDA 9.2+ - GCC 5+ -- [mmcv](https://github.com/open-mmlab/mmcv) 1.3.16+ -- [mmcls](https://mmclassification.readthedocs.io/en/latest/install.html) 0.19.0+ +- [mmcv](https://github.com/open-mmlab/mmcv) 1.4.2+ +- [mmcls](https://mmclassification.readthedocs.io/en/latest/install.html) 0.21.0+ - [mmdet](https://mmdetection.readthedocs.io/en/latest/get_started.html#installation) 2.16.0+ - [mmseg](https://mmsegmentation.readthedocs.io/en/latest/get_started.html#installation) 0.20.2+ @@ -16,7 +16,8 @@ | MMSelfSup version | MMCV version | MMClassification version | MMSegmentation version | MMDetection version | | :---------------: | :-----------------: | :------------------------: | :--------------------: | :-----------------: | -| 0.8.0 (master) | mmcv-full >= 1.3.16 | mmcls >= 0.21.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | +| 0.9.0 (master) | mmcv-full >= 1.4.2 | mmcls >= 0.21.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | +| 0.8.0 | mmcv-full >= 1.4.2 | mmcls >= 0.21.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | | 0.7.1 | mmcv-full >= 1.3.16 | mmcls >= 0.19.0, <= 0.20.1 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | | 0.6.0 | mmcv-full >= 1.3.16 | mmcls >= 0.19.0 | mmseg >= 0.20.2 | mmdet >= 2.16.0 | | 0.5.0 | mmcv-full >= 1.3.16 | / | mmseg >= 0.20.2 | mmdet >= 2.16.0 | diff --git a/mmselfsup/__init__.py b/mmselfsup/__init__.py index 5c1b76e83..cd673dba5 100644 --- a/mmselfsup/__init__.py +++ b/mmselfsup/__init__.py @@ -1,6 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings +import mmcls import mmcv from packaging.version import parse @@ -47,14 +48,21 @@ def digit_version(version_str: str, length: int = 4): return tuple(release) -mmcv_minimum_version = '1.3.16' -mmcv_maximum_version = '1.5.0' +mmcv_minimum_version = '1.4.2' +mmcv_maximum_version = '1.6.0' mmcv_version = digit_version(mmcv.__version__) +mmcls_minimum_version = '0.21.0' +mmcls_version = digit_version(mmcls.__version__) + assert (mmcv_version >= digit_version(mmcv_minimum_version) and mmcv_version <= digit_version(mmcv_maximum_version)), \ f'MMCV=={mmcv.__version__} is used but incompatible. ' \ f'Please install mmcv>={mmcv_minimum_version}, <={mmcv_maximum_version}.' +assert mmcls_version >= digit_version(mmcls_minimum_version), \ + f'MMClassification=={mmcls.__version__} is used but incompatible. ' \ + f'Please install mmcls>={mmcls_minimum_version}.' + __all__ = ['__version__', 'digit_version'] diff --git a/mmselfsup/version.py b/mmselfsup/version.py index 1fd5e1596..09c166cc2 100644 --- a/mmselfsup/version.py +++ b/mmselfsup/version.py @@ -1,6 +1,6 @@ # Copyright (c) Open-MMLab. All rights reserved. -__version__ = '0.8.0' +__version__ = '0.9.0' def parse_version_info(version_str): diff --git a/requirements/mminstall.txt b/requirements/mminstall.txt index a146d04d5..6bdb5cd04 100644 --- a/requirements/mminstall.txt +++ b/requirements/mminstall.txt @@ -1,4 +1,4 @@ mmcls >= 0.21.0 -mmcv-full>=1.3.16 +mmcv-full>=1.4.2 mmdet >= 2.16.0 mmsegmentation >= 0.20.2 diff --git a/requirements/readthedocs.txt b/requirements/readthedocs.txt index d08e48f91..ce9846ca2 100644 --- a/requirements/readthedocs.txt +++ b/requirements/readthedocs.txt @@ -1,5 +1,5 @@ faiss-cpu -mmcv>=1.3.16 +mmcv>=1.4.2 mmselfsup sklearn torch