• 时隔半年再战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!

  • 相关阅读:
    php 使用正则匹配中文 返回结果
    怎样判断一个jquery对象是否为空jquery对象
    关于tp5.0中对象数组转换普通数组使用助手函数collection而不是toArray
    PHP 面试题三
    PHP 面试题二
    PHP 面试题 一
    laravel 学习笔记 —— 神奇的服务容器
    ubuntu下安装opencv库+Python2.7环境安装及开发摄像头拍照应用
    Linux内核分析(七)----并发与竞态
    Linux内核分析(六)----字符设备控制方法实现|揭秘系统调用本质
  • 原文地址:https://www.cnblogs.com/necp-zwl/p/7898140.html
Copyright © 2020-2023  润新知