README.md 6.24 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
v0.6.0 (14/04/2019)
Kai Chen's avatar
Kai Chen committed
42
43
- Up to 30% speedup compared to the model zoo.
- Support both PyTorch stable and nightly version.
Kai Chen's avatar
Kai Chen committed
44
45
- Replace NMS and SigmoidFocalLoss with Pytorch CUDA extensions.

Kai Chen's avatar
Kai Chen committed
46
47
48
v0.6rc0(06/02/2019)
- Migrate to PyTorch 1.0.

Kai Chen's avatar
Kai Chen committed
49
50
51
52
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
53
54
55
56
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
57
58
59
60
61
62
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
63
64
65
v0.5.4 (27/11/2018)
- Add SingleStageDetector and RetinaNet.

Kai Chen's avatar
Kai Chen committed
66
67
v0.5.3 (26/11/2018)
- Add Cascade R-CNN and Cascade Mask R-CNN.
Kai Chen's avatar
Kai Chen committed
68
- Add support for Soft-NMS in config files.
Kai Chen's avatar
Kai Chen committed
69

Kai Chen's avatar
Kai Chen committed
70
71
72
73
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
74
75
76
77
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
78
79
## Benchmark and model zoo

Kai Chen's avatar
Kai Chen committed
80
81
82
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|                    | 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               | ✓        | ✓        | ☐        | ✗        | ✓     |
| Grid R-CNN         | ✓        | ✓        | ☐        | ✗        | ✓     |
| Hybrid Task Cascade| ✓        | ✓        | ☐        | ✗        | ✓     |
| Libra R-CNN        | ✓        | ✓        | ☐        | ✗        | ✓     |
| Guided Anchoring   | ✓        | ✓        | ☐        | ✗        | ✓     |
Kai Chen's avatar
Kai Chen committed
100

Kai Chen's avatar
Kai Chen committed
101
Other features
Kai Chen's avatar
Kai Chen committed
102
- [x] DCNv2
Kai Chen's avatar
Kai Chen committed
103
- [x] Group Normalization
104
- [x] Weight Standardization
Kai Chen's avatar
Kai Chen committed
105
106
- [x] OHEM
- [x] Soft-NMS
Kai Chen's avatar
Kai Chen committed
107
108
- [x] Generalized Attention
- [x] GCNet
Cao Yuhang's avatar
Cao Yuhang committed
109
- [x] Mixed Precision (FP16) Training
Kai Chen's avatar
Kai Chen committed
110
111


Kai Chen's avatar
Kai Chen committed
112
113
## Installation

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

Kai Chen's avatar
Kai Chen committed
116

Kai Chen's avatar
Kai Chen committed
117
## Get Started
Kai Chen's avatar
Kai Chen committed
118

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

Kai Chen's avatar
Kai Chen committed
121
122
## Contributing

Kai Chen's avatar
Kai Chen committed
123
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
124

Kai Chen's avatar
Kai Chen committed
125
126
127
128
129
## Acknowledgement

MMDetection is an open source project that is contributed by researchers and engineers from various colledges 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 detectors.

Kai Chen's avatar
Kai Chen committed
130
131
132

## Citation

Kai Chen's avatar
Kai Chen committed
133
If you use this toolbox or benchmark in your research, please cite this project.
Kai Chen's avatar
Kai Chen committed
134
135

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


## 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)).