Bump version to v0.19.0 (#623)

pull/629/head v0.19.0
Ma Zerun 2021-12-31 12:55:47 +08:00 committed by GitHub
parent cdf569a805
commit 7dfc9e4a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 132 additions and 61 deletions

View File

@ -6,6 +6,8 @@
[![Documentation Status](https://readthedocs.org/projects/mmclassification/badge/?version=latest)](https://mmclassification.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/mmclassification/badge/?version=latest)](https://mmclassification.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/open-mmlab/mmclassification/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmclassification) [![codecov](https://codecov.io/gh/open-mmlab/mmclassification/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmclassification)
[![license](https://img.shields.io/github/license/open-mmlab/mmclassification.svg)](https://github.com/open-mmlab/mmclassification/blob/master/LICENSE) [![license](https://img.shields.io/github/license/open-mmlab/mmclassification.svg)](https://github.com/open-mmlab/mmclassification/blob/master/LICENSE)
[![PyPI](https://badge.fury.io/py/mmcls.svg)](https://pypi.org/project/mmcls/)
[![Percentage of issues still open](https://isitmaintained.com/badge/open/open-mmlab/mmclassification.svg)](https://github.com/open-mmlab/mmclassification/issues)
## Introduction ## Introduction
@ -24,6 +26,7 @@ Documentation: https://mmclassification.readthedocs.io/en/latest/
- Bag of training tricks - Bag of training tricks
- Large-scale training configs - Large-scale training configs
- High efficiency and extensibility - High efficiency and extensibility
- Powerful toolkits
## License ## License
@ -31,46 +34,54 @@ This project is released under the [Apache 2.0 license](LICENSE).
## Changelog ## Changelog
v0.19.0 was released in 31/12/2021.
Highlights of the new version:
- The **feature extraction** function has been enhanced. See [#593](https://github.com/open-mmlab/mmclassification/pull/593) for more details.
- Provide the high-acc **ResNet-50** training settings from [*ResNet strikes back*](https://arxiv.org/abs/2110.00476).
- Reproduce the training accuracy of **T2T-ViT** & **RegNetX**, and provide self-training checkpoints.
- Support **DeiT** & **Conformer** backbone and checkpoints.
- Provide a **CAM visualization** tool based on [pytorch-grad-cam](https://github.com/jacobgil/pytorch-grad-cam), and detailed [user guide](https://mmclassification.readthedocs.io/en/latest/tools/visualization.html#class-activation-map-visualization)!
v0.18.0 was released in 30/11/2021. v0.18.0 was released in 30/11/2021.
Highlights of the new version: Highlights of the new version:
- Support **MLP-Mixer** backbone and provide pre-trained checkpoints. - Support **MLP-Mixer** backbone and provide pre-trained checkpoints.
- Add a tool to **visualize the learning rate curve** of the training phase. Welcome to use with the [tutorial](https://mmclassification.readthedocs.io/en/latest/tools/visualization.html#learning-rate-schedule-visualization)! - Add a tool to **visualize the learning rate curve** of the training phase. Welcome to use with the [tutorial](https://mmclassification.readthedocs.io/en/latest/tools/visualization.html#learning-rate-schedule-visualization)!
v0.17.0 was released in 29/10/2021.
Highlights of this version:
- Support **Tokens-to-Token ViT** backbone and **Res2Net** backbone. Welcome to use!
- Support **ImageNet21k** dataset.
- Add a **pipeline visualization** tool. Try it with the [tutorials](https://mmclassification.readthedocs.io/en/latest/tools/visualization.html#pipeline-visualization)!
Please refer to [changelog.md](docs/en/changelog.md) for more details and other release history. Please refer to [changelog.md](docs/en/changelog.md) for more details and other release history.
## Benchmark and model zoo ## Benchmark and model zoo
Results and models are available in the [model zoo](docs/en/model_zoo.md). Results and models are available in the [model zoo](docs/en/model_zoo.md).
Supported backbones: <details open>
<summary>Supported backbones</summary>
- [x] VGG - [x] [VGG](https://github.com/open-mmlab/mmclassification/tree/master/configs/vgg)
- [x] ResNet - [x] [ResNet](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnet)
- [x] ResNeXt - [x] [ResNeXt](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnext)
- [x] SE-ResNet - [x] [SE-ResNet](https://github.com/open-mmlab/mmclassification/tree/master/configs/seresnet)
- [x] SE-ResNeXt - [x] [SE-ResNeXt](https://github.com/open-mmlab/mmclassification/tree/master/configs/seresnet)
- [x] RegNet - [x] [RegNet](https://github.com/open-mmlab/mmclassification/tree/master/configs/repvgg)
- [x] ShuffleNetV1 - [x] [ShuffleNetV1](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v1)
- [x] ShuffleNetV2 - [x] [ShuffleNetV2](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v2)
- [x] MobileNetV2 - [x] [MobileNetV2](https://github.com/open-mmlab/mmclassification/tree/master/configs/mobilenet_v2)
- [x] MobileNetV3 - [x] [MobileNetV3](https://github.com/open-mmlab/mmclassification/tree/master/configs/mobilenet_v3)
- [x] Swin-Transformer - [x] [Swin-Transformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/swin_transformer)
- [x] RepVGG - [x] [RepVGG](https://github.com/open-mmlab/mmclassification/tree/master/configs/repvgg)
- [x] Vision-Transformer - [x] [Vision-Transformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/vision_transformer)
- [x] Transformer-in-Transformer - [x] [Transformer-in-Transformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/tnt)
- [x] Res2Net - [x] [Res2Net](https://github.com/open-mmlab/mmclassification/tree/master/configs/res2net)
- [x] MLP-Mixer - [x] [MLP-Mixer](https://github.com/open-mmlab/mmclassification/tree/master/configs/mlp_mixer)
- [ ] DeiT - [x] [DeiT](https://github.com/open-mmlab/mmclassification/tree/master/configs/deit)
- [ ] Conformer - [x] [Conformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/conformer)
- [x] [T2T-ViT](https://github.com/open-mmlab/mmclassification/tree/master/configs/t2t_vit)
- [ ] EfficientNet - [ ] EfficientNet
- [ ] Twins
- [ ] HRNet
</details>
## Installation ## Installation

View File

@ -8,6 +8,8 @@
[![Documentation Status](https://readthedocs.org/projects/mmclassification/badge/?version=latest)](https://mmclassification.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/mmclassification/badge/?version=latest)](https://mmclassification.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/open-mmlab/mmclassification/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmclassification) [![codecov](https://codecov.io/gh/open-mmlab/mmclassification/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmclassification)
[![license](https://img.shields.io/github/license/open-mmlab/mmclassification.svg)](https://github.com/open-mmlab/mmclassification/blob/master/LICENSE) [![license](https://img.shields.io/github/license/open-mmlab/mmclassification.svg)](https://github.com/open-mmlab/mmclassification/blob/master/LICENSE)
[![PyPI](https://badge.fury.io/py/mmcls.svg)](https://pypi.org/project/mmcls/)
[![Percentage of issues still open](https://isitmaintained.com/badge/open/open-mmlab/mmclassification.svg)](https://github.com/open-mmlab/mmclassification/issues)
## Introduction ## Introduction
@ -23,6 +25,7 @@ MMClassification 是一款基于 PyTorch 的开源图像分类工具箱,是 [O
- 支持配置多种训练技巧 - 支持配置多种训练技巧
- 大量的训练配置文件 - 大量的训练配置文件
- 高效率和高可扩展性 - 高效率和高可扩展性
- 功能强大的工具箱
## 许可证 ## 许可证
@ -30,46 +33,54 @@ MMClassification 是一款基于 PyTorch 的开源图像分类工具箱,是 [O
## 更新日志 ## 更新日志
2021/12/31 发布了 v0.19.0 版本
新版本亮点:
- **特征提取**功能得到了加强。详见 [#593](https://github.com/open-mmlab/mmclassification/pull/593)。
- 提供了 **ResNet-50** 的高精度训练配置,原论文参见 [*ResNet strikes back*](https://arxiv.org/abs/2110.00476)。
- 复现了 **T2T-ViT****RegNetX** 的训练精度,并提供了自训练的模型权重文件。
- 支持了 **DeiT****Conformer** 主干网络,并提供了预训练模型。
- 提供了一个 **CAM 可视化** 工具。该工具基于 [pytorch-grad-cam](https://github.com/jacobgil/pytorch-grad-cam),我们提供了详细的 [使用教程](https://mmclassification.readthedocs.io/en/latest/tools/visualization.html#class-activation-map-visualization)
2021/11/30 发布了 v0.18.0 版本 2021/11/30 发布了 v0.18.0 版本
新版本的一些新功能如下: 新版本亮点
- 支持了 **MLP-Mixer** 主干网络,欢迎使用! - 支持了 **MLP-Mixer** 主干网络,欢迎使用!
- 添加了一个**可视化学习率曲线**的工具,可以参考[教程](https://mmclassification.readthedocs.io/zh_CN/latest/tools/visualization.html#id3)使用 - 添加了一个**可视化学习率曲线**的工具,可以参考[教程](https://mmclassification.readthedocs.io/zh_CN/latest/tools/visualization.html#id3)使用
2021/10/29 发布了 v0.17.0 版本
该版本的一些新功能如下:
- 支持了 **Tokens-to-Token ViT** 主干网络和 **Res2Net** 主干网络,欢迎使用!
- 支持了 **ImageNet21k** 数据集
- 添加了一个**可视化数据预处理**的工具,可以参考[教程](https://mmclassification.readthedocs.io/zh_CN/latest/tools/visualization.html#id2)使用
发布历史和更新细节请参考 [更新日志](docs/en/changelog.md) 发布历史和更新细节请参考 [更新日志](docs/en/changelog.md)
## 基准测试及模型库 ## 基准测试及模型库
相关结果和模型可在 [model zoo](docs/en/model_zoo.md) 中获得 相关结果和模型可在 [model zoo](docs/en/model_zoo.md) 中获得
支持的主干网络: <details open>
<summary>支持的主干网络</summary>
- [x] VGG - [x] [VGG](https://github.com/open-mmlab/mmclassification/tree/master/configs/vgg)
- [x] ResNet - [x] [ResNet](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnet)
- [x] ResNeXt - [x] [ResNeXt](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnext)
- [x] SE-ResNet - [x] [SE-ResNet](https://github.com/open-mmlab/mmclassification/tree/master/configs/seresnet)
- [x] SE-ResNeXt - [x] [SE-ResNeXt](https://github.com/open-mmlab/mmclassification/tree/master/configs/seresnet)
- [x] RegNet - [x] [RegNet](https://github.com/open-mmlab/mmclassification/tree/master/configs/repvgg)
- [x] ShuffleNetV1 - [x] [ShuffleNetV1](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v1)
- [x] ShuffleNetV2 - [x] [ShuffleNetV2](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v2)
- [x] MobileNetV2 - [x] [MobileNetV2](https://github.com/open-mmlab/mmclassification/tree/master/configs/mobilenet_v2)
- [x] MobileNetV3 - [x] [MobileNetV3](https://github.com/open-mmlab/mmclassification/tree/master/configs/mobilenet_v3)
- [x] Swin-Transformer - [x] [Swin-Transformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/swin_transformer)
- [x] RepVGG - [x] [RepVGG](https://github.com/open-mmlab/mmclassification/tree/master/configs/repvgg)
- [x] Vision-Transformer - [x] [Vision-Transformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/vision_transformer)
- [x] Transformer-in-Transformer - [x] [Transformer-in-Transformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/tnt)
- [x] Res2Net - [x] [Res2Net](https://github.com/open-mmlab/mmclassification/tree/master/configs/res2net)
- [x] MLP-Mixer - [x] [MLP-Mixer](https://github.com/open-mmlab/mmclassification/tree/master/configs/mlp_mixer)
- [ ] DeiT - [x] [DeiT](https://github.com/open-mmlab/mmclassification/tree/master/configs/deit)
- [ ] Conformer - [x] [Conformer](https://github.com/open-mmlab/mmclassification/tree/master/configs/conformer)
- [x] [T2T-ViT](https://github.com/open-mmlab/mmclassification/tree/master/configs/t2t_vit)
- [ ] EfficientNet - [ ] EfficientNet
- [ ] Twins
- [ ] HRNet
</details>
## 安装 ## 安装

View File

@ -3,8 +3,8 @@ ARG CUDA="10.2"
ARG CUDNN="7" ARG CUDNN="7"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
ARG MMCV="1.3.16" ARG MMCV="1.4.2"
ARG MMCLS="0.18.0" ARG MMCLS="0.19.0"
ENV PYTHONUNBUFFERED TRUE ENV PYTHONUNBUFFERED TRUE

View File

@ -1,5 +1,53 @@
# Changelog # Changelog
## v0.19.0(31/12/2021)
### Highlights
- The feature extraction function has been enhanced. See [#593](https://github.com/open-mmlab/mmclassification/pull/593) for more details.
- Provide the high-acc ResNet-50 training settings from [*ResNet strikes back*](https://arxiv.org/abs/2110.00476).
- Reproduce the training accuracy of T2T-ViT & RegNetX, and provide self-training checkpoints.
- Support DeiT & Conformer backbone and checkpoints.
- Provide a CAM visualization tool based on [pytorch-grad-cam](https://github.com/jacobgil/pytorch-grad-cam), and detailed [user guide](https://mmclassification.readthedocs.io/en/latest/tools/visualization.html#class-activation-map-visualization)!
### New Features
- Support Precise BN. ([#401](https://github.com/open-mmlab/mmclassification/pull/401))
- Add CAM visualization tool. ([#577](https://github.com/open-mmlab/mmclassification/pull/577))
- Repeated Aug and Sampler Registry. ([#588](https://github.com/open-mmlab/mmclassification/pull/588))
- Add DeiT backbone and checkpoints. ([#576](https://github.com/open-mmlab/mmclassification/pull/576))
- Support LAMB optimizer. ([#591](https://github.com/open-mmlab/mmclassification/pull/591))
- Implement the conformer backbone. ([#494](https://github.com/open-mmlab/mmclassification/pull/494))
- Add the frozen function for Swin Transformer model. ([#574](https://github.com/open-mmlab/mmclassification/pull/574))
- Support using checkpoint in Swin Transformer to save memory. ([#557](https://github.com/open-mmlab/mmclassification/pull/557))
### Improvements
- [Reproduction] Reproduce RegNetX training accuracy. ([#587](https://github.com/open-mmlab/mmclassification/pull/587))
- [Reproduction] Reproduce training results of T2T-ViT. ([#610](https://github.com/open-mmlab/mmclassification/pull/610))
- [Enhance] Provide high-acc training settings of ResNet. ([#572](https://github.com/open-mmlab/mmclassification/pull/572))
- [Enhance] Set a random seed when the user does not set a seed. ([#554](https://github.com/open-mmlab/mmclassification/pull/554))
- [Enhance] Added `NumClassCheckHook` and unit tests. ([#559](https://github.com/open-mmlab/mmclassification/pull/559))
- [Enhance] Enhance feature extraction function. ([#593](https://github.com/open-mmlab/mmclassification/pull/593))
- [Enhance] Improve efficiency of precision, recall, f1_score and support. ([#595](https://github.com/open-mmlab/mmclassification/pull/595))
- [Enhance] Improve accuracy calculation performance. ([#592](https://github.com/open-mmlab/mmclassification/pull/592))
- [Refactor] Refactor `analysis_log.py`. ([#529](https://github.com/open-mmlab/mmclassification/pull/529))
- [Refactor] Use new API of matplotlib to handle blocking input in visualization. ([#568](https://github.com/open-mmlab/mmclassification/pull/568))
- [CI] Cancel previous runs that are not completed. ([#583](https://github.com/open-mmlab/mmclassification/pull/583))
- [CI] Skip build CI if only configs or docs modification. ([#575](https://github.com/open-mmlab/mmclassification/pull/575))
### Bug Fixes
- Fix test sampler bug. ([#611](https://github.com/open-mmlab/mmclassification/pull/611))
- Try to create a symbolic link, otherwise copy. ([#580](https://github.com/open-mmlab/mmclassification/pull/580))
- Fix a bug for multiple output in swin transformer. ([#571](https://github.com/open-mmlab/mmclassification/pull/571))
### Docs Update
- Update mmcv, torch, cuda version in Dockerfile and docs. ([#594](https://github.com/open-mmlab/mmclassification/pull/594))
- Add analysis&misc docs. ([#525](https://github.com/open-mmlab/mmclassification/pull/525))
- Fix docs build dependency. ([#584](https://github.com/open-mmlab/mmclassification/pull/584))
## v0.18.0(30/11/2021) ## v0.18.0(30/11/2021)
### Highlights ### Highlights

View File

@ -11,6 +11,7 @@ The compatible MMClassification and MMCV versions are as below. Please install t
| MMClassification version | MMCV version | | MMClassification version | MMCV version |
|:------------------------:|:---------------------:| |:------------------------:|:---------------------:|
| master | mmcv>=1.3.16, <=1.5.0 | | master | mmcv>=1.3.16, <=1.5.0 |
| 0.19.0 | mmcv>=1.3.16, <=1.5.0 |
| 0.18.0 | mmcv>=1.3.16, <=1.5.0 | | 0.18.0 | mmcv>=1.3.16, <=1.5.0 |
| 0.17.0 | mmcv>=1.3.8, <=1.5.0 | | 0.17.0 | mmcv>=1.3.8, <=1.5.0 |
| 0.16.0 | mmcv>=1.3.8, <=1.5.0 | | 0.16.0 | mmcv>=1.3.8, <=1.5.0 |

View File

@ -11,6 +11,7 @@ MMClassification 和 MMCV 的适配关系如下,请安装正确版本的 MMCV
| MMClassification 版本 | MMCV 版本 | | MMClassification 版本 | MMCV 版本 |
|:---------------------:|:---------------------:| |:---------------------:|:---------------------:|
| master | mmcv>=1.3.16, <=1.5.0 | | master | mmcv>=1.3.16, <=1.5.0 |
| 0.19.0 | mmcv>=1.3.16, <=1.5.0 |
| 0.18.0 | mmcv>=1.3.16, <=1.5.0 | | 0.18.0 | mmcv>=1.3.16, <=1.5.0 |
| 0.17.0 | mmcv>=1.3.8, <=1.5.0 | | 0.17.0 | mmcv>=1.3.8, <=1.5.0 |
| 0.16.0 | mmcv>=1.3.8, <=1.5.0 | | 0.16.0 | mmcv>=1.3.8, <=1.5.0 |

View File

@ -1,14 +1,14 @@
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
import collections.abc import collections.abc
import warnings import warnings
from distutils.version import LooseVersion
from itertools import repeat from itertools import repeat
import torch import torch
from mmcv.utils import digit_version
def is_tracing() -> bool: def is_tracing() -> bool:
if LooseVersion(torch.__version__) >= LooseVersion('1.6.0'): if digit_version(torch.__version__) >= digit_version('1.6.0'):
on_trace = torch.jit.is_tracing() on_trace = torch.jit.is_tracing()
# In PyTorch 1.6, torch.jit.is_tracing has a bug. # In PyTorch 1.6, torch.jit.is_tracing has a bug.
# Refers to https://github.com/pytorch/pytorch/issues/42448 # Refers to https://github.com/pytorch/pytorch/issues/42448

View File

@ -1,6 +1,6 @@
# Copyright (c) OpenMMLab. All rights reserved # Copyright (c) OpenMMLab. All rights reserved
__version__ = '0.18.0' __version__ = '0.19.0'
def parse_version_info(version_str): def parse_version_info(version_str):

View File

@ -1,8 +1,7 @@
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
from distutils.version import LooseVersion
import pytest import pytest
import torch import torch
from mmcv.utils import digit_version
from mmcls.models.utils import channel_shuffle, is_tracing, make_divisible from mmcls.models.utils import channel_shuffle, is_tracing, make_divisible
@ -41,7 +40,7 @@ def test_channel_shuffle():
@pytest.mark.skipif( @pytest.mark.skipif(
LooseVersion(torch.__version__) < LooseVersion('1.6.0'), digit_version(torch.__version__) < digit_version('1.6.0'),
reason='torch.jit.is_tracing is not available before 1.6.0') reason='torch.jit.is_tracing is not available before 1.6.0')
def test_is_tracing(): def test_is_tracing():