zoukankan      html  css  js  c++  java
  • 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 
    

     成功。

  • 相关阅读:
    题解「CF204E Little Elephant and Strings」
    题解「CF1000G Two-Paths」
    消息机制及按钮实效性
    View(视图)——消息机制
    城市线程练习题后续
    城市线程练习题
    View(视图)——对话框之日期对话框和时间对话框文集
    View(视图)——对话框之进度对话框
    删除对话框练习
    拨打电话与发送短信功能
  • 原文地址:https://www.cnblogs.com/peiyuYang/p/8196037.html
Copyright © 2011-2022 走看看