README.md 6.96 KB
Newer Older
pangjm's avatar
pangjm committed
1

Kai Chen's avatar
Kai Chen committed
2
3
4
# MMDetection

**News**: We released the technical report on [ArXiv](https://arxiv.org/abs/1906.07155).
Dahua Lin's avatar
Dahua Lin committed
5

Kai Chen's avatar
Kai Chen committed
6
## Introduction
Dahua Lin's avatar
Dahua Lin committed
7

Kai Chen's avatar
Kai Chen committed
8
The master branch works with **PyTorch 1.1** or higher.
Kai Chen's avatar
Kai Chen committed
9

Kai Chen's avatar
Kai Chen committed
10
11
mmdetection is an open source object detection toolbox based on PyTorch. It is
a part of the open-mmlab project developed by [Multimedia Laboratory, CUHK](http://mmlab.ie.cuhk.edu.hk/).
Dahua Lin's avatar
Dahua Lin committed
12

Kai Chen's avatar
Kai Chen committed
13
14
![demo image](demo/coco_test_12510.jpg)

Kai Chen's avatar
Kai Chen committed
15
### Major features
Dahua Lin's avatar
Dahua Lin committed
16
17
18

- **Modular Design**

Kai Chen's avatar
Kai Chen committed
19
  We decompose the detection framework into different components and one can easily construct a customized object detection framework by combining different modules.
pangjm's avatar
pangjm committed
20

Dahua Lin's avatar
Dahua Lin committed
21
22
- **Support of multiple frameworks out of box**

Kai Chen's avatar
Kai Chen committed
23
  The toolbox directly supports popular and contemporary detection frameworks, *e.g.* Faster RCNN, Mask RCNN, RetinaNet, etc.
Kai Chen's avatar
Kai Chen committed
24

Kai Chen's avatar
Kai Chen committed
25
- **High efficiency**
Kai Chen's avatar
Kai Chen committed
26

Kai Chen's avatar
Kai Chen committed
27
  All basic bbox and mask operations run on GPUs now. The training speed is faster than or comparable to other codebases, including [Detectron](https://github.com/facebookresearch/Detectron), [maskrcnn-benchmark](https://github.com/facebookresearch/maskrcnn-benchmark) and [SimpleDet](https://github.com/TuSimple/simpledet).
pangjm's avatar
pangjm committed
28

Dahua Lin's avatar
Dahua Lin committed
29
30
- **State of the art**

Kai Chen's avatar
Kai Chen committed
31
  The toolbox stems from the codebase developed by the *MMDet* team, who won [COCO Detection Challenge](http://cocodataset.org/#detection-leaderboard) in 2018, and we keep pushing it forward.
Kai Chen's avatar
Kai Chen committed
32

Kai Chen's avatar
Kai Chen committed
33
Apart from MMDetection, we also released a library [mmcv](https://github.com/open-mmlab/mmcv) for computer vision research, which is heavily depended on by this toolbox.
Kai Chen's avatar
Kai Chen committed
34
35
36

## License

Kai Chen's avatar
Kai Chen committed
37
This project is released under the [Apache 2.0 license](LICENSE).
Kai Chen's avatar
Kai Chen committed
38

Kai Chen's avatar
Kai Chen committed
39
40
## Updates

Kai Chen's avatar
Kai Chen committed
41
42
43
44
45
46
47
v1.0rc0 (27/07/2019)
- Implement lots of new methods and components (Mixed Precision Training, HTC, Libra R-CNN, Guided Anchoring, Empirical Attention, Mask Scoring R-CNN, Grid R-CNN (Plus), GHM, GCNet, FCOS, HRNet, Weight Standardization, etc.). Thank all collaborators!
- Support two additional datasets: WIDER FACE and Cityscapes.
- Refactoring for loss APIs and make it more flexible to adopt different losses and related hyper-parameters.
- Speed up multi-gpu testing.
- Integrate all compiling and installing in a single script.

Kai Chen's avatar
Kai Chen committed
48
v0.6.0 (14/04/2019)
Kai Chen's avatar
Kai Chen committed
49
50
- Up to 30% speedup compared to the model zoo.
- Support both PyTorch stable and nightly version.
Kai Chen's avatar
Kai Chen committed
51
52
- Replace NMS and SigmoidFocalLoss with Pytorch CUDA extensions.

Kai Chen's avatar
Kai Chen committed
53
54
55
v0.6rc0(06/02/2019)
- Migrate to PyTorch 1.0.

Kai Chen's avatar
Kai Chen committed
56
57
58
59
v0.5.7 (06/02/2019)
- Add support for Deformable ConvNet v2. (Many thanks to the authors and [@chengdazhi](https://github.com/chengdazhi))
- This is the last release based on PyTorch 0.4.1.

Kai Chen's avatar
Kai Chen committed
60
61
62
63
v0.5.6 (17/01/2019)
- Add support for Group Normalization.
- Unify RPNHead and single stage heads (RetinaHead, SSDHead) with AnchorHead.

Kai Chen's avatar
Kai Chen committed
64
65
66
67
68
69
v0.5.5 (22/12/2018)
- Add SSD for COCO and PASCAL VOC.
- Add ResNeXt backbones and detection models.
- Refactoring for Samplers/Assigners and add OHEM.
- Add VOC dataset and evaluation scripts.

Kai Chen's avatar
Kai Chen committed
70
71
72
v0.5.4 (27/11/2018)
- Add SingleStageDetector and RetinaNet.

Kai Chen's avatar
Kai Chen committed
73
74
v0.5.3 (26/11/2018)
- Add Cascade R-CNN and Cascade Mask R-CNN.
Kai Chen's avatar
Kai Chen committed
75
- Add support for Soft-NMS in config files.
Kai Chen's avatar
Kai Chen committed
76

Kai Chen's avatar
Kai Chen committed
77
78
79
80
v0.5.2 (21/10/2018)
- Add support for custom datasets.
- Add a script to convert PASCAL VOC annotations to the expected format.

Kai Chen's avatar
Kai Chen committed
81
82
83
84
v0.5.1 (20/10/2018)
- Add BBoxAssigner and BBoxSampler, the `train_cfg` field in config files are restructured.
- `ConvFCRoIHead` / `SharedFCRoIHead` are renamed to `ConvFCBBoxHead` / `SharedFCBBoxHead` for consistency.

Kai Chen's avatar
Kai Chen committed
85
86
## Benchmark and model zoo

Kai Chen's avatar
Kai Chen committed
87
88
89
Supported methods and backbones are shown in the below table.
Results and models are available in the [Model zoo](MODEL_ZOO.md).

Kai Chen's avatar
Kai Chen committed
90
91
92
93
94
95
96
97
98
99
100
101
102
|                    | ResNet   | ResNeXt  | SENet    | VGG      | HRNet |
|--------------------|:--------:|:--------:|:--------:|:--------:|:-----:|
| RPN                | ✓        | ✓        | ☐        | ✗        | ✓     |
| Fast R-CNN         | ✓        | ✓        | ☐        | ✗        | ✓     |
| Faster R-CNN       | ✓        | ✓        | ☐        | ✗        | ✓     |
| Mask R-CNN         | ✓        | ✓        | ☐        | ✗        | ✓     |
| Cascade R-CNN      | ✓        | ✓        | ☐        | ✗        | ✓     |
| Cascade Mask R-CNN | ✓        | ✓        | ☐        | ✗        | ✓     |
| SSD                | ✗        | ✗        | ✗        | ✓        | ✗     |
| RetinaNet          | ✓        | ✓        | ☐        | ✗        | ✓     |
| GHM                | ✓        | ✓        | ☐        | ✗        | ✓     |
| Mask Scoring R-CNN | ✓        | ✓        | ☐        | ✗        | ✓     |
| FCOS               | ✓        | ✓        | ☐        | ✗        | ✓     |
Kai Chen's avatar
Kai Chen committed
103
| Double-Head R-CNN  | ✓        | ✓        | ☐        | ✗        | ✓     |
Kai Chen's avatar
Kai Chen committed
104
| Grid R-CNN (Plus)  | ✓        | ✓        | ☐        | ✗        | ✓     |
Kai Chen's avatar
Kai Chen committed
105
106
107
| Hybrid Task Cascade| ✓        | ✓        | ☐        | ✗        | ✓     |
| Libra R-CNN        | ✓        | ✓        | ☐        | ✗        | ✓     |
| Guided Anchoring   | ✓        | ✓        | ☐        | ✗        | ✓     |
Kai Chen's avatar
Kai Chen committed
108

Kai Chen's avatar
Kai Chen committed
109
Other features
Kai Chen's avatar
Kai Chen committed
110
- [x] DCNv2
Kai Chen's avatar
Kai Chen committed
111
- [x] Group Normalization
112
- [x] Weight Standardization
Kai Chen's avatar
Kai Chen committed
113
114
- [x] OHEM
- [x] Soft-NMS
Kai Chen's avatar
Kai Chen committed
115
116
- [x] Generalized Attention
- [x] GCNet
Cao Yuhang's avatar
Cao Yuhang committed
117
- [x] Mixed Precision (FP16) Training
Kai Chen's avatar
Kai Chen committed
118
119


Kai Chen's avatar
Kai Chen committed
120
121
## Installation

Kai Chen's avatar
Kai Chen committed
122
Please refer to [INSTALL.md](INSTALL.md) for installation and dataset preparation.
Kai Chen's avatar
Kai Chen committed
123

Kai Chen's avatar
Kai Chen committed
124

Kai Chen's avatar
Kai Chen committed
125
## Get Started
Kai Chen's avatar
Kai Chen committed
126

Kai Chen's avatar
Kai Chen committed
127
Please see [GETTING_STARTED.md](GETTING_STARTED.md) for the basic usage of MMDetection.
Kai Chen's avatar
Kai Chen committed
128

Kai Chen's avatar
Kai Chen committed
129
130
## Contributing

Kai Chen's avatar
Kai Chen committed
131
We appreciate all contributions to improve MMDetection. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for the contributing guideline.
Kai Chen's avatar
Kai Chen committed
132

Kai Chen's avatar
Kai Chen committed
133
134
## Acknowledgement

135
MMDetection 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.
Kai Chen's avatar
Kai Chen committed
136
137
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 detectors.

Kai Chen's avatar
Kai Chen committed
138
139
140

## Citation

Kai Chen's avatar
Kai Chen committed
141
If you use this toolbox or benchmark in your research, please cite this project.
Kai Chen's avatar
Kai Chen committed
142
143

```
Kai Chen's avatar
Kai Chen committed
144
@article{mmdetection,
Kai Chen's avatar
Kai Chen committed
145
  title   = {{MMDetection}: Open MMLab Detection Toolbox and Benchmark},
Kai Chen's avatar
Kai Chen committed
146
147
148
149
150
151
152
153
  author  = {Chen, Kai and Wang, Jiaqi and Pang, Jiangmiao and Cao, Yuhang and
             Xiong, Yu and Li, Xiaoxiao and Sun, Shuyang and Feng, Wansen and
             Liu, Ziwei and Xu, Jiarui and Zhang, Zheng and Cheng, Dazhi and
             Zhu, Chenchen and Cheng, Tianheng and Zhao, Qijie and Li, Buyu and
             Lu, Xin and Zhu, Rui and Wu, Yue and Dai, Jifeng and Wang, Jingdong
             and Shi, Jianping and Ouyang, Wanli and Loy, Chen Change and Lin, Dahua},
  journal= {arXiv preprint arXiv:1906.07155},
  year={2019}
Kai Chen's avatar
Kai Chen committed
154
155
}
```
Kai Chen's avatar
Kai Chen committed
156
157
158
159
160


## Contact

This repo is currently maintained by Kai Chen ([@hellock](http://github.com/hellock)), Jiangmiao Pang ([@OceanPang](https://github.com/OceanPang)), Jiaqi Wang ([@myownskyW7](https://github.com/myownskyW7)) and Yuhang Cao ([@yhcao6](https://github.com/yhcao6)).