zoukankan      html  css  js  c++  java
  • 时隔半年再战fast-rcnn

    Py-Faster-RCNN(Caffe)的安装

    1.git clone —recursive https://github.com/rbgirshick/py-faster-rcnn.git

    2.sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libhdf5-dev

    sudo apt-get install --no-install-recommends libboost-all-dev
    sudo apt-get install libatlas-base-dev
    sudo apt-get install python-dev
    sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev

    sudo apt-get install --no-install-recommends libboost-all-dev 

     3. 安装 Cython, easydict, opencv

    这三个库一定要记得安装,否则会报错

    sudo pip install cython
    sudo pip install easydict
    sudo apt-get install python-opencv

    4.在 /py-faster-rcnn/lib directory 目录下执行make, 会出现如下结果:
    这里写图片描述

    5.修改makefile.config

    8行

    USE_CUDNN := 1

    87行

    WITH_PYTHON_LAYER := 1

    90行

    INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial

    其他项,比如atlas、anaconda的python等,看情况修改,不修改也OK。

    6。修改makefile

    1.LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

    2.LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

    7.

    编译caffe-fast-rcnn

    需要先更新用到的caffe:原版py-faster-rcnn依赖的caffe比较老,不支持cudnnv5,那就更新下对应的源码。提供两种版本,方法1更简单些。

    利用git修改 参考https://www.cnblogs.com/zf-blog/p/6701710.html

    http://blog.csdn.net/10km/article/details/62418583

    cd caffe-fast-rcnn  
    git remote add caffe https://github.com/BVLC/caffe.git  
    git fetch caffe  
    git merge -X theirs caffe/master  

    然后在合并之后注释掉include/caffe/layers/python_layer.hpp文件里的self_.attr(“phase”) = static_cast(this->phase_)

     参考:http://blog.csdn.net/nicky_lyu/article/details/53181434

    https://www.cnblogs.com/zjutzz/p/6034408.html

    make runtest的时候出现 Check failed: error == cudaSuccess (30 vs. 0) unknown error

    (网上也有说把makefile.config文件中的compute改了 我的显卡是gtx 1050 照着官网改成了61改完再加sudo就成功了 估计不用改)

    sudo make runtest ok!

  • 相关阅读:
    Rails组件逐个数:Rails Form helpers
    watirwebdriver常用方法
    Rails组件逐个数:Rails Form helpers(续)
    rails常用命令速查手册
    Rails new, build, create, save方法区别
    Ruby如何使用require从外部加载自定义类或模块
    升级Firefox8后watirwebdriver出现错误“unable to obtain stable firefox connection in 60 seconds”
    POJ2723Get Luffy Out(2sat)
    POJ3683Priest John's Busiest Day(2sat)
    UVA11374Airport Express(dijkstra)
  • 原文地址:https://www.cnblogs.com/necp-zwl/p/7898140.html
Copyright © 2011-2022 走看看