detectron学习记录

刚开始学习,不断更新中…
【安装】
github地址

注意避坑:

  1. torchvision和pytorch一起在官网安装好
  2. python 3.6以上
  3. cuda驱动提前安装好

通过本地安装:

git clone https://github.com/facebookresearch/detectron2.git
cd detectron2
pip3 install -e .

下载预训练模型:官网地址

【demo测试】
官网地址
在detectron2目录下放入测试图片input.jpg,同级新建输出文件夹output,新建模型文件夹models,放入上面下载的预训练模型。

python3 demo/demo.py --config-file configs/COCO-Detection/faster_rcnn_R_50_C4_1x.yaml \
 --input input.jpg \
 --output output \
 --opts MODEL.WEIGHTS models/model_final_721ade.pkl

原图
在这里插入图片描述
检测结果
在这里插入图片描述

发布了18 篇原创文章 · 获赞 3 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/hyluglare/article/details/104456432