py-R-FCN安装

1.下载py-R-FCN

git clone https://github.com/Orpine/py-R-FCN.git

 

2.下载caffe

cd $RFCN_ROOT  
git clone https://github.com/Microsoft/caffe.git

 

3.替换cudnn

由于cudnn版本问题,所以重新拷贝(家目录):

cp caffe/include/caffe/util/cudnn.hpp py-R-FCN/caffe/include/caffe/util/cudnn.hpp 
 
cp caffe/src/caffe/layers/cudnn_* py-R-FCN/caffe/src/caffe/layers/

cp caffe/include/caffe/layers/cudnn_* py-R-FCN/caffe/include/caffe/layers/

 

4. lib目录下编译

cd /home/user/py-R-FCN/lib

make

 

5.编译caffe和pycaffe

拷贝自己的Makefile.config,注释掉Makefile.config目录下的Anaconda的部分,编译:

cd $RFCN_ROOT/caffe  

make -j8 && make pycaffe

 

6.测试demo

需要下载resnet50_rfcn_final.caffemodel和resnet101_rfcn_final.caffemodel。

放在RFCN_ROOT/data/rfcn_models/路径下。

直接运行demo会报错:

Demo for data/demo/000456.jpg
Detection took 0.069s for 300 object proposals
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: minimal, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)

所以先注释掉环境变量中的Anaconda。

运行demo会报错:

Traceback (most recent call last):
  File "./tools/demo_rfcn.py", line 17, in <module>
    from fast_rcnn.config import cfg
  File "/home/user/py-R-FCN/tools/../lib/fast_rcnn/config.py", line 23, in <module>
    from easydict import EasyDict as edict
ImportError: No module named easydict

安装easydict:

pip install easydict

 运行demo:

./tools/demo_rfcn.py --net ResNet-50 

 成功。

转载于:https://www.cnblogs.com/peiyuYang/p/8196037.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值