Ubuntu18.04 implements Faster RCNN target detection based on detectron2 (3)-Faster RCNN detects a single image

1. demo.py

The detection of a single picture on the picture can be achieved by the following command

python3 demo.py --config-file ../configs/PascalVOC-Detection/faster_rcnn_R_50_FPN.yaml \
  --input cat.jpg \
  --output result_cat_voc.jpg \
  --opts MODEL.WEIGHTS ../tools/output_bak/model_final.pth

demo.pyIn the demo folder of detectron2 ,
``

The original image
cat.jpg
detection result is
result.jpg

Guess you like

Origin blog.csdn.net/linghu8812/article/details/105724810
Recommended