2021-12-23 10:35:49 +08:00
< div align = "center" >
< img src = "resources/mmrazor-logo.png" width = "600" / >
< / div >
< br / >
[](https://pypi.org/project/mmrazor/)
[](https://pypi.org/project/mmrazor)
[](https://mmrazor.readthedocs.io/en/latest/)
[](https://github.com/open-mmlab/mmrazor/actions)
[](https://codecov.io/gh/open-mmlab/mmrazor)
[](https://github.com/open-mmlab/mmrazor/blob/master/LICENSE)
[](https://github.com/open-mmlab/mmrazor/issues)
[](https://github.com/open-mmlab/mmrazor/issues)
Documentation: https://mmrazor.readthedocs.io/
English | [简体中文 ](/README_zh-CN.md )
## Introduction
MMRazor is an open source model compression toolbox based on PyTorch. It is
a part of the [OpenMMLab ](https://openmmlab.com/ ) project.
< details open > < summary > Major features< / summary >
- **All in one**
MMRazor includes Neural Architecture Search( NAS), Knowledge Distillation( KD), Pruning, and Quantization( coming soon).
And it supports the combination of different types of algorithms.
- **General CV Model Compression ToolBox**
2021-12-23 12:35:51 +08:00
Thanks to OpenMMLab, the algorithms in MMRazor can be quickly applied to different CV tasks, making the development of model compression algorithms once and for all.
2021-12-23 10:35:49 +08:00
- **Decouple model and compression algorithm**
MMRazor has a variety of built-in automation mechanisms, allowing developers to implement model compression algorithms without modifying the raw model code, such as:
- OP can be modified code-free.
- Feature maps in the middle layers can be obtained code-free.
- Automatically obtain and analyze the connection between nn.Module.
- And More ...
- **Flexible and Modular Design**
We decompose the model compression algorithms into different components, making it much easier and more flexible to build a new algorithm by combining different components.
< / details >
2021-12-23 18:25:05 +08:00
Below is an overview of MMRazor's design and implementation, please refer to [tutorials ](/docs/en/tutorials/Tutorial_1_overview.md ) for more details.
2021-12-23 10:35:49 +08:00
< div align = "center" >
< img src = "resources/design_and_implement.png" style = "zoom:100%" / >
< / div >
< br / >
## License
This project is released under the [Apache 2.0 license ](LICENSE ).
## Changelog
v0.1.0 was released in 12/23/2021.
## Benchmark and model zoo
Results and models are available in the [model zoo ](/docs/en/model_zoo.md ).
## Installation
Please refer to [get_started.md ](/docs/en/get_started.md ) for installation.
## Getting Started
Please refer to [train.md ](/docs/en/train.md ) and [test.md ](/docs/en/test.md ) for the basic usage of MMRazor. There are also tutorials:
2021-12-23 18:25:05 +08:00
- [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 )
2021-12-23 10:35:49 +08:00
## Citation
If you find this project useful in your research, please consider cite:
```BibTeX
@misc {2021mmrazor,
2021-12-23 18:01:52 +08:00
title={OpenMMLab Model Compression Toolbox and Benchmark},
2021-12-23 10:35:49 +08:00
author={MMRazor Contributors},
howpublished = {\url{https://github.com/open-mmlab/mmrazor}},
year={2021}
}
```
## Contributing
We appreciate all contributions to improve MMRazor.
Please refer to [CONTRUBUTING.md ](/.github/CONTRIBUTING.md ) for the contributing guideline.
## Acknowledgement
MMRazor is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks.
We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new model compression methods.
## Projects in OpenMMLab
- [MMCV ](https://github.com/open-mmlab/mmcv ): OpenMMLab foundational library for computer vision.
- [MIM ](https://github.com/open-mmlab/mim ): MIM Installs OpenMMLab Packages.
- [MMClassification ](https://github.com/open-mmlab/mmclassification ): OpenMMLab image classification toolbox and benchmark.
- [MMDetection ](https://github.com/open-mmlab/mmdetection ): OpenMMLab detection toolbox and benchmark.
2021-12-23 18:01:52 +08:00
- [MMDetection3D ](https://github.com/open-mmlab/mmdetection3d ): OpenMMLab next-generation platform for general 3D object detection.
2021-12-23 10:35:49 +08:00
- [MMSegmentation ](https://github.com/open-mmlab/mmsegmentation ): OpenMMLab semantic segmentation toolbox and benchmark.
2021-12-23 18:01:52 +08:00
- [MMAction2 ](https://github.com/open-mmlab/mmaction2 ): OpenMMLab next-generation action understanding toolbox and benchmark.
2021-12-23 10:35:49 +08:00
- [MMTracking ](https://github.com/open-mmlab/mmtracking ): OpenMMLab video perception toolbox and benchmark.
- [MMPose ](https://github.com/open-mmlab/mmpose ): OpenMMLab pose estimation toolbox and benchmark.
- [MMEditing ](https://github.com/open-mmlab/mmediting ): OpenMMLab image and video editing toolbox.
- [MMOCR ](https://github.com/open-mmlab/mmocr ): OpenMMLab toolbox for text detection, recognition and understanding.
- [MMGeneration ](https://github.com/open-mmlab/mmgeneration ): OpenMMlab toolkit for generative models.
- [MMFlow ](https://github.com/open-mmlab/mmflow ) OpenMMLab optical flow toolbox and benchmark.
- [MMFewShot ](https://github.com/open-mmlab/mmfewshot ): OpenMMLab FewShot Learning Toolbox and Benchmark.
- [MMHuman3D ](https://github.com/open-mmlab/mmhuman3d ): OpenMMLab 3D Human Parametric Model Toolbox and Benchmark.
- [MMSelfSup ](https://github.com/open-mmlab/mmselfsup ): OpenMMLab self-supervised learning Toolbox and Benchmark.
2021-12-23 12:35:51 +08:00
- [MMRazor ](https://github.com/open-mmlab/mmrazor ): OpenMMLab Model Compression Toolbox and Benchmark.