README.md 6.76 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
| Grid R-CNN (Plus)  | ✓        | ✓        | ☐        | ✗        | ✓     |
Kai Chen's avatar
Kai Chen committed
104
105
106
| Hybrid Task Cascade| ✓        | ✓        | ☐        | ✗        | ✓     |
| Libra R-CNN        | ✓        | ✓        | ☐        | ✗        | ✓     |
| Guided Anchoring   | ✓        | ✓        | ☐        | ✗        | ✓     |
Kai Chen's avatar
Kai Chen committed
107

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


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

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

Kai Chen's avatar
Kai Chen committed
123

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

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

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

Kai Chen's avatar
Kai Chen committed
130
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
131

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

134
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
135
136
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
137
138
139

## Citation

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

```
Kai Chen's avatar
Kai Chen committed
143
@article{mmdetection,
Kai Chen's avatar
Kai Chen committed
144
  title   = {{MMDetection}: Open MMLab Detection Toolbox and Benchmark},
Kai Chen's avatar
Kai Chen committed
145
146
147
148
149
150
  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
151
152
}
```
Kai Chen's avatar
Kai Chen committed
153
154
155
156
157


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