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 
    

     成功。

  • 相关阅读:
    pip遇见的format问题
    opencv配置
    WPF学习笔记2
    WPF笔记1 用VS2015创建WPF程序
    C#基础知识
    电脑中毒了。
    感觉又学到了不少,在这里写下来,但也有一个问题,不知道是为甚吗?
    通过对HTML有一定的了解后,现在我开始学HTML DOM了。
    此情可待成追忆,只是当时已惘然。
    常用PS快捷键
  • 原文地址:https://www.cnblogs.com/peiyuYang/p/8196037.html
Copyright © 2011-2022 走看看