Ubuntu18.04 基于detectron2实现Faster RCNN目标检测(三)——Faster RCNN检测单张图片

1. demo.py

在图片上实现单张图片的检测可以通过以下命令实现

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.pydetectron2的demo文件夹里,
``

原始图片
cat.jpg
检测结果为
result.jpg

猜你喜欢

转载自blog.csdn.net/linghu8812/article/details/105724810