ubuntu 18.04编译安装PANet

环境:ubuntu18.04    pytorch0.4.0

  • 1. 去官方给出的源码链接下载PANet

  • 2. 参照Detectron.pytorch的安装步骤安装

  • 2.1 Requirements

Tested under python3.

  • python packages
    • pytorch>=0.3.1
    • torchvision>=0.2.0
    • cython
    • matplotlib
    • numpy
    • scipy
    • opencv
    • pyyaml
    • packaging
    • pycocotools — for COCO dataset, also available from pip.
    • tensorboardX — for logging the losses in Tensorboard
  • An NVIDAI GPU and CUDA 8.0 or higher. Some operations only have gpu implementation.
  • NOTICE: different versions of Pytorch package have different memory usages.

 

  • 2.2 Compilation
cd lib  # please change to this directory
sh make.sh

然后,就可以进行测试了,运行

python tools/test_net.py --dataset coco2017 --cfg configs/panet/e2e_panet_R-50-FPN_2x_mask.yaml --load_ckpt {path/to/your/checkpoint}

load_ckpt:在官方代码页面上可以下到。

 

跑程序的时候遇到一点问题:

  • 1. cv2.findContours报错:

ValueError: too many values to unpack

意思是说 cv2.findContours 只返回了两个值,但是你想要三个值。

cv2.findContours 只返回 contours, hierarchy,没有 image 返回。

  • 2. Python下"No moudule named _tkinter"问题解决:
sudo apt-get install python3-tk

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值