1. Background introduction
- Detectron2 project address: https://github.com/facebookresearch/detectron2
- FasterRCNN paper: https://arxiv.org/abs/1506.01497
- COCO data set: http://cocodataset.org/#home
- VOC data set: http://host.robots.ox.ac.uk/pascal/VOC/
2. Environmental requirements
- Ubuntu 18.04
- CUDA10
- pytorch==1.3.0
- torchvision==0.4.1
- pycocotools
3. Installation steps
3.1 Installation dependencies
- cocoapi
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install
- Cython
pip install cython
3.2 Install detectron2
git clone https://github.com/facebookresearch/detectron2.git
cd detectron2 && python -m pip install -e .
4. Test the installation
After the installation is complete, you can enter the following command to test whether the installation is successful.
python3 demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
--input cat.jpg \
--output result_cat.jpg \
--opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl
The input picture is: the
result picture is: the
test is successful, indicating that the installation is successful, and the framework can be used for further training, testing, etc.