mmdetection is an open source object detection toolbox based on PyTorch. It is
More code and models will be released soon. Stay tuned.
a part of the open-mmlab project developed by [Multimedia Laboratory, CUHK](http://mmlab.ie.cuhk.edu.hk/).

### Major features
## Highlights
-**Totally box-free:** SOLO is totally box-free thus not being restricted by (anchor) box locations and scales, and naturally benefits from the inherent advantages of FCNs.
-**Direct instance segmentation:** Our method takes an image as input, directly outputs instance masks and corresponding class probabilities, in a fully convolutional, box-free and grouping-free paradigm.
-**State-of-the-art performance:** Our best single model based on ResNet-101 and deformable convolutions achieves **41.7%** in AP on COCO test-dev (without multi-scale testing). A light-weight version of SOLOv2 executes at **31.3** FPS on a single V100 GPU and yields **37.1%** AP.
-**Modular Design**
## Updates
- SOLOv1 is available. Code and trained models of SOLO and Decoupled SOLO are released. (28/03/2020)
We decompose the detection framework into different components and one can easily construct a customized object detection framework by combining different modules.
-**Support of multiple frameworks out of box**
The toolbox directly supports popular and contemporary detection frameworks, *e.g.* Faster RCNN, Mask RCNN, RetinaNet, etc.
-**High efficiency**
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).
-**State of the art**
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.
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.
## License
This project is released under the [Apache 2.0 license](LICENSE).
## Changelog
v1.0.0 was released in 30/1/2020, with more than 20 fixes and improvements.
Please refer to [CHANGELOG.md](docs/CHANGELOG.md) for details and release history.
## Benchmark and model zoo
Supported methods and backbones are shown in the below table.
Results and models are available in the [Model zoo](docs/MODEL_ZOO.md).
This implementation is based on [mmdetection](https://github.com/open-mmlab/mmdetection)(v1.0.0). Please refer to [INSTALL.md](docs/INSTALL.md) for installation and dataset preparation.
Please refer to [INSTALL.md](docs/INSTALL.md) for installation and dataset preparation.
## Models
For your convenience, we provide the following trained models on COCO (more models are coming soon).
## Get Started
Model | Multi-scale training | Testing time / im | AP (minival) | Link
--- |:---:|:---:|:---:|:---:
SOLO_R50_FPN_1x | No | 77ms | 32.9 | [download](https://cloudstor.aarnet.edu.au/plus/s/nTOgDldI4dvDrPs/download)
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.
### Testing
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.
If you use this toolbox or benchmark in your research, please cite this project.
## Contributing to the project
Any pull requests or issues are welcome.
## Citations
Please consider citing our paper in your publications if the project helps your research. BibTeX reference is as follows.
```
```
@article{mmdetection,
@article{wang2019solo,
title = {{MMDetection}: Open MMLab Detection Toolbox and Benchmark},
title={SOLO: Segmenting Objects by Locations},
author = {Chen, Kai and Wang, Jiaqi and Pang, Jiangmiao and Cao, Yuhang and
author={Wang, Xinlong and Kong, Tao and Shen, Chunhua and Jiang, Yuning and Li, Lei},
Xiong, Yu and Li, Xiaoxiao and Sun, Shuyang and Feng, Wansen and
journal={arXiv preprint arXiv:1912.04488},
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}
year={2019}
}
}
```
```
```
## Contact
@article{wang2020solov2,
title={SOLOv2: Dynamic, Faster and Stronger},
This repo is currently maintained by Kai Chen ([@hellock](http://github.com/hellock)), Yuhang Cao ([@yhcao6](https://github.com/yhcao6)), Wenwei Zhang ([@ZwwWayne](https://github.com/ZwwWayne)), Jiangmiao Pang ([@OceanPang](https://github.com/OceanPang)) and Jiaqi Wang ([@myownskyW7](https://github.com/myownskyW7)).
author={Wang, Xinlong and Zhang, Rufeng and Kong, Tao and Li, Lei and Shen, Chunhua},
d. Install build requirements and then install mmdetection.
d. Install build requirements and then install SOLO.
(We install pycocotools via the github repo instead of pypi because the pypi version is old and not compatible with the latest numpy.)
(We install pycocotools via the github repo instead of pypi because the pypi version is old and not compatible with the latest numpy.)
```shell
```shell
...
@@ -53,7 +53,7 @@ Note:
...
@@ -53,7 +53,7 @@ Note:
1. The git commit id will be written to the version number with step d, e.g. 0.6.0+2e7045c. The version will also be saved in trained models.
1. The git commit id will be written to the version number with step d, e.g. 0.6.0+2e7045c. The version will also be saved in trained models.
It is recommended that you run step d each time you pull some updates from github. If C++/CUDA codes are modified, then this step is compulsory.
It is recommended that you run step d each time you pull some updates from github. If C++/CUDA codes are modified, then this step is compulsory.
2. Following the above instructions, mmdetection is installed on `dev` mode, any local modifications made to the code will take effect without the need to reinstall it (unless you submit some commits and want to update the version number).
2. Following the above instructions, SOLO is installed on `dev` mode, any local modifications made to the code will take effect without the need to reinstall it (unless you submit some commits and want to update the version number).
3. If you would like to use `opencv-python-headless` instead of `opencv-python`,
3. If you would like to use `opencv-python-headless` instead of `opencv-python`,
you can install it before installing MMCV.
you can install it before installing MMCV.
...
@@ -62,20 +62,20 @@ you can install it before installing MMCV.
...
@@ -62,20 +62,20 @@ you can install it before installing MMCV.
### Another option: Docker Image
### Another option: Docker Image
We provide a [Dockerfile](https://github.com/open-mmlab/mmdetection/blob/master/docker/Dockerfile) to build an image.
We provide a [Dockerfile](https://github.com/WXinlong/SOLO/blob/master/docker/Dockerfile) to build an image.
```shell
```shell
# build an image with PyTorch 1.1, CUDA 10.0 and CUDNN 7.5
# build an image with PyTorch 1.1, CUDA 10.0 and CUDNN 7.5
docker build -tmmdetection docker/
docker build -tSOLO docker/
```
```
### Prepare datasets
### Prepare datasets
It is recommended to symlink the dataset root to `$MMDETECTION/data`.
It is recommended to symlink the dataset root to `$SOLO/data`.
If your folder structure is different, you may need to change the corresponding paths in config files.
If your folder structure is different, you may need to change the corresponding paths in config files.
```
```
mmdetection
SOLO
├── mmdet
├── mmdet
├── tools
├── tools
├── configs
├── configs
...
@@ -104,16 +104,16 @@ mv train/*/* train/
...
@@ -104,16 +104,16 @@ mv train/*/* train/
### A from-scratch setup script
### A from-scratch setup script
Here is a full script for setting up mmdetection with conda and link the dataset path (supposing that your COCO dataset path is $COCO_ROOT).
Here is a full script for setting up SOLO with conda and link the dataset path (supposing that your COCO dataset path is $COCO_ROOT).