Detection2(一)安装

文章目录[隐藏]

源码下载及编译

下载

可以在github上下载或者直接通过命令行下载

  1. 链接下载: https://github.com/facebookresearch/detectron2

  2. 命令下载:

     git clone https://github.com/facebookresearch/detectron2.git
    

编译

python -m pip install -e detectron2

Demo

首先在 model_zoo 里选择一个预训练的 model,这里选择 mask_rcnn_R_50_FPN_3x.yaml.

python demo/demo.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
 --input input1.jpg \
 --output . \
 --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl 

说明一下:
-config-file configs/COCO-… 读取 model 配置

–input input1.jpg 设置输入。 input1.jpg 位于根目录
–output . |设置输出路径,这里设为根目录

版权声明:本文为CSDN博主「锅巴不写代码」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_45095281/article/details/122229528

我还没有学会写个人说明!

暂无评论

发表评论

相关推荐

YOLOv3学习——锚框和候选区域

YOLOv3学习之锚框和候选区域
单阶段目标检测模型YOLOv3
R-CNN系列算法需要先产生候选区域,再对候选区域做分类和位置坐标的预测,这类算法被称为两阶段目标检测算法。近几年,很多研究人员相继

YOLOv1损失函数代码详解

V1损失函数: 1、标注图像某位置有目标,预测为有>计算not response loss 未响应损失以及box框的坐标等的信息对应蓝色框和红色框
其代码为: # # # # # # # # # #