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!

  • 相关阅读:
    个人总结
    第十六周学习进度条
    第二阶段冲刺第十天
    第二阶段冲刺第九天
    分层体系架构模式
    安卓语音识别
    AndroidStudio中导入jar包的方法
    Android中控件之间添加分割线
    按照分层设计理念,完成《XXX需求征集系统》的概念结构设计
    在Eclipse下搭建Hibernate框架(加载hibernate工具插件,离线)
  • 原文地址:https://www.cnblogs.com/necp-zwl/p/7898140.html
Copyright © 2011-2022 走看看