安装detercton2

# Windows 从源码安装
下载detectorn2到本地, 注意detectorn2的版本,一定是下载v0.6的版本!!!
git clone -b v0.6 https://github.com/facebookresearch/detectron2
cd detectron2
python setup.py build --force develop

windows端,如果编译出错,需要将`detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu`文件中第6-8行:
#ifdef WITH_CUDA
#include "../box_iou_rotated/box_iou_rotated_utils.h"
#endif
改为:
#include "box_iou_rotated/box_iou_rotated_utils.h"

# 验证-目标检测
python demo/demo.py --config-file configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml --input jy.jpg --opts MODEL.WEIGHTS 'model_final_b275ba.pkl'
# pkl文件下载地址:https://github.com/facebookresearch/detectron2/blob/main/MODEL_ZOO.md

# Linux (官方下载地址:https://detectron2.readthedocs.io/en/latest/tutorials/install.html)
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.9/index.html
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值