Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Prepare for checkouting default branch and releasing new version #518

Merged
merged 10 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ workflows:
tools/.* lint_only false
configs/.* lint_only false
.circleci/.* lint_only false
base-revision: dev-1.x
base-revision: main
# this is the path of the configuration we should trigger once
# path filtering and pipeline parameter value updates are
# complete. In this case, we are using the parent dynamic
Expand Down
14 changes: 7 additions & 7 deletions .circleci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ jobs:
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
mim install 'mmcv >= 2.0.0rc1'
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
pip install git+https://github.com/open-mmlab/mmsegmentation.git@dev-1.x
python -m pip install git+ssh://git@github.com/open-mmlab/mmpose.git@dev-1.x
pip install git+https://github.com/open-mmlab/mmpretrain.git@mmcls-1.x
pip install git+https://github.com/open-mmlab/mmdetection.git@main
pip install git+https://github.com/open-mmlab/mmsegmentation.git@main
python -m pip install git+ssh://git@github.com/open-mmlab/mmpose.git@main
pip install -r requirements.txt
- run:
name: Build and install
Expand Down Expand Up @@ -139,7 +139,7 @@ workflows:
filters:
branches:
ignore:
- dev-1.x
- main
- 1.x
pr_stage_test:
when:
Expand All @@ -150,7 +150,7 @@ workflows:
filters:
branches:
ignore:
- dev-1.x
- main
- build_cpu:
name: minimum_version_cpu
torch: 1.8.1
Expand Down Expand Up @@ -190,4 +190,4 @@ workflows:
filters:
branches:
only:
- dev-1.x
- main
50 changes: 34 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!--算法库 Badges-->

[![PyPI](https://img.shields.io/pypi/v/mmrazor)](https://pypi.org/project/mmrazor)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmrazor.readthedocs.io/en/quantize/)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmrazor.readthedocs.io/en/main/)
[![badge](https://github.com/open-mmlab/mmrazor/workflows/build/badge.svg)](https://github.com/open-mmlab/mmrazor/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmrazor/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmrazor)
[![license](https://img.shields.io/github/license/open-mmlab/mmrazor.svg)](https://github.com/open-mmlab/mmrazor/blob/master/LICENSE)
Expand All @@ -32,9 +32,9 @@

<!--Note:请根据各算法库自身情况设置项目和链接-->

[📘Documentation](https://mmrazor.readthedocs.io/en/quantize/) |
[🛠️Installation](https://mmrazor.readthedocs.io/en/quantize/get_started/installation.html) |
[👀Model Zoo](https://mmrazor.readthedocs.io/en/quantize/get_started/model_zoo.html) |
[📘Documentation](https://mmrazor.readthedocs.io/en/main/) |
[🛠️Installation](https://mmrazor.readthedocs.io/en/main/get_started/installation.html) |
[👀Model Zoo](https://mmrazor.readthedocs.io/en/main/get_started/model_zoo.html) |
[🤔Reporting Issues](https://github.com/open-mmlab/mmrazor/issues/new/choose)

</div>
Expand Down Expand Up @@ -86,22 +86,23 @@ Major features:

With better modular design, developers can implement new model compression algorithms with only a few codes, or even by simply modifying config files.

Below is an overview of MMRazor's design and implementation, please refer to [tutorials](https://mmrazor.readthedocs.io/en/quantize/get_started/overview.html) for more details.
About MMRazor's design and implementation, please refer to [tutorials](https://mmrazor.readthedocs.io/en/main/get_started/overview.html) for more details.

<div align="center">
<img src="resources/design_and_implement.png" style="zoom:100%"/>
</div>
<br />
## Latest Updates

## What's new
**The default branch is now `main` and the code on the branch has been upgraded to v1.0.0. The old `master` branch code now exists on the 0.x branch**

MMRazor v1.0.0rc0 was released in 1/9/2022.
MMRazor v1.0.0 was released in 2023-4-18, Major updates from 1.0.0rc2 include:

Please refer to [changelog.md](/docs/en/notes/changelog.md) for more details and other release history.
1. MMRazor quantization is released.
2. Add a new pruning algorithm named GroupFisher.
3. Support distilling rtmdet with MMRazor.

To know more about the updates in MMRazor 1.0, please refer to [Changelog](https://mmrazor.readthedocs.io/en/main/notes/changelog.html) for more details!

## Benchmark and model zoo

Results and models are available in the [model zoo](/docs/en/get_started/model_zoo.md).
Results and models are available in the [model zoo](https://mmrazor.readthedocs.io/en/main/get_started/model_zoo.html).

Supported algorithms:

Expand All @@ -121,6 +122,12 @@ Supported algorithms:

- [x] [AutoSlim(NeurIPS'2019)](/configs/pruning/mmcls/autoslim)

- [x] [L1-norm](/configs/pruning/mmcls/l1-norm)

- [x] [Group Fisher](/configs/pruning/base/group_fisher)

- [x] [DMCP](/configs/pruning/mmcls/dmcp)

</details>

<details open>
Expand Down Expand Up @@ -156,20 +163,31 @@ Supported algorithms:

</details>

<details open>
<summary>Quantization</summary>

- [x] [PTQ](/configs/quantization/ptq/base)

- [x] [QAT](/configs/quantization/qat/base)

- [x] [LSQ](/configs/quantization/qat/lsq)

</details>

## Installation

MMRazor depends on [PyTorch](https://pytorch.org/), [MMCV](https://github.com/open-mmlab/mmcv) and [MMEngine](https://github.com/open-mmlab/mmengine).

Please refer to [installation.md](/docs/en/get_started/installation.md) for more detailed instruction.
Please refer to [installation.md](https://mmrazor.readthedocs.io/en/main/get_started/installation.html) for more detailed instruction.

## Getting Started

Please refer to [user guides](https://mmrazor.readthedocs.io/en/quantize/user_guides/index.html) for the basic usage of MMRazor. There are also [advanced guides](https://mmrazor.readthedocs.io/en/quantize/advanced_guides/index.html):
Please refer to [user guides](https://mmrazor.readthedocs.io/en/main/user_guides/index.html) for the basic usage of MMRazor. There are also [advanced guides](https://mmrazor.readthedocs.io/en/main/advanced_guides/index.html):

## Contributing

We appreciate all contributions to improve MMRazor.
Please refer to [CONTRUBUTING.md](/docs/en/notes/contribution_guide.md) for the contributing guideline.
Please refer to [CONTRUBUTING.md](https://mmrazor.readthedocs.io/en/main/notes/contribution_guide.html) for the contributing guideline.

## Acknowledgement

Expand Down
83 changes: 57 additions & 26 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!--算法库 Badges-->

[![PyPI](https://img.shields.io/pypi/v/mmrazor)](https://pypi.org/project/mmrazor)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmrazor.readthedocs.io/en/latest/)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmrazor.readthedocs.io/en/main/)
[![badge](https://github.com/open-mmlab/mmrazor/workflows/build/badge.svg)](https://github.com/open-mmlab/mmrazor/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmrazor/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmrazor)
[![license](https://img.shields.io/github/license/open-mmlab/mmrazor.svg)](https://github.com/open-mmlab/mmrazor/blob/master/LICENSE)
Expand All @@ -32,9 +32,9 @@

<!--Note:请根据各算法库自身情况设置项目和链接-->

[📘使用文档](https://mmrazor.readthedocs.io/) |
[🛠️安装教程](https://mmrazor.readthedocs.io/en/latest/get_started.html) |
[👀模型库](https://mmrazor.readthedocs.io/en/latest/model_zoo.html) |
[📘使用文档](https://mmrazor.readthedocs.io/en/main/) |
[🛠️安装教程](https://mmrazor.readthedocs.io/en/main/get_started/installation.html) |
[👀👀模型库](https://mmrazor.readthedocs.io/en/main/get_started/model_zoo.html) |
[🤔报告问题](https://github.com/open-mmlab/mmrazor/issues/new/choose)

</div>
Expand All @@ -54,7 +54,7 @@ MMRazor是一个可用于模型瘦身和AutoML的模型压缩工具箱,包含
- 网络结构搜索 (NAS)
- 模型剪枝
- 知识蒸馏 (KD)
- 量化 (下个版本发布)
- 量化

MMRazor是[OpenMMLab](https://openmmlab.com/)项目的一部分。

Expand All @@ -72,20 +72,19 @@ MMRazor是[OpenMMLab](https://openmmlab.com/)项目的一部分。

得益于更好的模块化设计,开发者仅用修改少量代码,甚至只用修改配置文件即可实现新的轻量化算法。

下面是MMRazor设计和实现的概括图, 如果想了解更多的细节,请参考 [tutorials](/docs/en/tutorials/Tutorial_1_overview.md)。
关于MMRazor设计和实现的概括图, 如果想了解更多的细节,请参考 [tutorials](/docs/en/tutorials/Tutorial_1_overview.md)。

<div align="center">
<img src="resources/design_and_implement.png" style="zoom:100%"/>
</div>
<br />
## 近期更新

**默认分支目前为 main,且分支上的代码已经切换到 v1.0.0 版本。旧版 master 分支的代码现存在 0.x 分支上**

## 更新日志

MMRazor v0.3.1 版本已经在 2022.5.4 发布。

## 基准测试和模型库

测试结果可以在 [模型库](docs/en/model_zoo.md) 中找到.
测试结果可以在 [模型库](https://mmrazor.readthedocs.io/en/main/get_started/model_zoo.html) 中找到.

已经支持的算法:

Expand All @@ -99,37 +98,69 @@ Neural Architecture Search

Pruning

- [x] [AutoSlim(NeurIPS'2019)](/configs/pruning/autoslim)
- [x] [AutoSlim(NeurIPS'2019)](/configs/pruning/mmcls/autoslim)

- [x] [L1-norm](/configs/pruning/mmcls/l1-norm)

- [x] [Group Fisher](/configs/pruning/base/group_fisher)

- [x] [DMCP](/configs/pruning/mmcls/dmcp)

Knowledge Distillation

- [x] [CWD(ICCV'2021)](/configs/distill/cwd)
- [x] [CWD(ICCV'2021)](/configs/distill/mmdet/cwd)

- [x] [WSLD(ICLR'2021)](/configs/distill/mmcls/wsld)

- [x] [ABLoss](/configs/distill/mmcls/abloss)

- [x] [BYOT](/configs/distill/mmcls/byot)

- [x] [DAFL](/configs/distill/mmcls/dafl)

- [x] [DFAD](/configs/distill/mmcls/dfad)

- [x] [DKD](/configs/distill/mmcls/dkd)

- [x] [WSLD(ICLR'2021)](/configs/distill/wsld)
- [x] [Factor Transfer](/configs/distill/mmcls/factor_transfer)

- [x] [FitNets](/configs/distill/mmcls/fitnets)

- [x] [KD](/configs/distill/mmcls/kd)

- [x] [OFD](/configs/distill/mmcls/ofd)

- [x] [RKD](/configs/distill/mmcls/rkd)

- [x] [ZSKT](/configs/distill/mmcls/zskt)

- [x] [FBKD](/configs/distill/mmdet/fbkd)

<details open>
<summary>Quantization</summary>

- [x] [PTQ](/configs/quantization/ptq/base)

- [x] [QAT](/configs/quantization/qat/base)

- [x] [LSQ](/configs/quantization/qat/lsq)

</details>

## 安装

MMRazor 依赖 [PyTorch](https://pytorch.org/) 和 [MMCV](https://github.com/open-mmlab/mmcv)。

请参考[get_started.md](/docs/en/get_started.md)获取更详细的安装指南。
请参考[安装教程](https://mmrazor.readthedocs.io/en/main/get_started/installation.html)获取更详细的安装指南。

## 快速入门

请参考 [get_started.md](/docs/en/get_started.md) 学习 MMRazor 的基本使用。 我们也提供了一些进阶教程:

- [overview](/docs/en/tutorials/Tutorial_1_overview.md)
- [learn about configs](/docs/en/tutorials/Tutorial_2_learn_about_configs.md)
- [customize architectures](/docs/en/tutorials/Tutorial_3_customize_architectures.md)
- [customize nas algorithms](/docs/en/tutorials/Tutorial_4_customize_nas_algorithms.md)
- [customize pruning algorithms](/docs/en/tutorials/Tutorial_5_customize_pruning_algorithms.md)
- [customize kd algorithms](/docs/en/tutorials/Tutorial_6_customize_kd_algorithms.md)
- [customize mixed algorithms with our algorithm_components](/docs/en/tutorials/Tutorial_7_customize_mixed_algorithms_with_out_algorithms_components.md)
- [apply existing algorithms to other existing tasks](/docs/en/tutorials/Tutorial_8_apply_existing_algorithms_to_new_tasks.md)
请参考 [用户指引](https://mmrazor.readthedocs.io/en/main/user_guides/index.html) 学习 MMRazor 的基本使用。 我们也提供了一些[进阶教程](https://mmrazor.readthedocs.io/en/main/advanced_guides/index.html):

## 贡献指南

我们感谢所有的贡献者为改进和提升 MMRazor 所作出的努力。
请参考[贡献指南](/.github/CONTRIBUTING.md)来了解参与项目贡献的相关指引。
请参考[贡献指南](https://mmrazor.readthedocs.io/en/main/notes/contribution_guide.html)来了解参与项目贡献的相关指引。

## 致谢

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
]),
function_record_to_pop=[
'mmcls.models.classifiers.ImageClassifier.forward',
'mmcls.models.classifiers.BaseClassifier.forward'
'mmcls.models.classifiers.BaseClassifier.forward', 'torch.cat'
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
function_record_to_pop=[
'mmdet.models.detectors.single_stage.SingleStageDetector.forward',
'mmdet.models.detectors.two_stage.TwoStageDetector.forward',
'mmdet.models.detectors.single_stage_instance_seg.SingleStageInstanceSegmentor.forward' # noqa: E501
'mmdet.models.detectors.single_stage_instance_seg.SingleStageInstanceSegmentor.forward', # noqa: E501
'torch.cat'
])
2 changes: 1 addition & 1 deletion configs/quantization/ptq/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ python tools/ptq.py ${CONFIG}
python tools/test.py ${CONFIG} ${CKPT}
```

For more details, please refer to [Quantization User Guide](mmrazor/docs/en/user_guides/quantization_user_guide.md)
For more details, please refer to [Quantization User Guide](https://mmrazor.readthedocs.io/en/main/user_guides/quantization_user_guide.html)
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
'../../deploy_cfgs/mmcls/classification_openvino_dynamic-224x224.py'
]

val_dataloader = dict(batch_size=32)
_base_.val_dataloader.batch_size = 32

test_cfg = dict(
type='mmrazor.PTQLoop',
calibrate_dataloader=val_dataloader,
calibrate_dataloader=_base_.val_dataloader,
calibrate_steps=32,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
'../../deploy_cfgs/mmcls/classification_openvino_dynamic-224x224.py'
]

val_dataloader = dict(batch_size=32)
_base_.val_dataloader.batch_size = 32

test_cfg = dict(
type='mmrazor.PTQLoop',
calibrate_dataloader=val_dataloader,
calibrate_dataloader=_base_.val_dataloader,
calibrate_steps=32,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
'../../deploy_cfgs/mmcls/classification_openvino_dynamic-224x224.py'
]

val_dataloader = dict(batch_size=32)
_base_.val_dataloader.batch_size = 32

test_cfg = dict(
type='mmrazor.PTQLoop',
calibrate_dataloader=val_dataloader,
calibrate_dataloader=_base_.val_dataloader,
calibrate_steps=32,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
'../../deploy_cfgs/mmdet/detection_openvino_dynamic-800x1344.py'
]

val_dataloader = dict(batch_size=32)
_base_.val_dataloader.batch_size = 32

test_cfg = dict(
type='mmrazor.PTQLoop',
calibrate_dataloader=val_dataloader,
calibrate_dataloader=_base_.val_dataloader,
calibrate_steps=32,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
'../../deploy_cfgs/mmdet/detection_openvino_dynamic-800x1344.py'
]

val_dataloader = dict(batch_size=32)
_base_.val_dataloader.batch_size = 32

test_cfg = dict(
type='mmrazor.PTQLoop',
calibrate_dataloader=val_dataloader,
calibrate_dataloader=_base_.val_dataloader,
calibrate_steps=32,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
'../../deploy_cfgs/mmcls/classification_tensorrt-int8-explicit_dynamic-224x224.py' # noqa: E501
]

val_dataloader = dict(batch_size=32)
_base_.val_dataloader.batch_size = 32

test_cfg = dict(
type='mmrazor.PTQLoop',
calibrate_dataloader=val_dataloader,
calibrate_dataloader=_base_.val_dataloader,
calibrate_steps=32,
)

Expand Down
Loading