zoukankan      html  css  js  c++  java
  • py-faster-rcnn 的makefile.config 注意事项

    在配置py-faster-rcnn的过程中,我遇到一些问题,记录如下

    py-faster-rcnn文件夹下面有一个caffe-fast-rcnn文件夹

    这个过程中,我们需要编译caffe, 

     大神的caffe和caffe官网的版本不太一样

    我第一次直接照搬caffe的makefile.config,导致了很多错误

    rbgirshick 大神说,需要打开 WITH_PYTHON_LAYER := 1
                         和  USE_CUDNN := 1

    Note: Caffe must be built with support for Python layers!

    # In your Makefile.config, make sure to have this line uncommented
    WITH_PYTHON_LAYER := 1
    # Unrelatedly, it's also recommended that you use CUDNN
    USE_CUDNN := 1
    但是由于我安装的cudnn版本不对,就造成下面的报
    util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)’:  
    ./include/caffe/util/cudnn.hpp:117:13: error: ‘CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING’ was not declared in this scope  
         *mode = CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING;  
                 ^  
    Makefile:510: recipe for target '.build_release/src/caffe/util/im2col.o' failed  
    make: *** [.build_release/src/caffe/util/im2col.o] Error 1  

    这个时候,可以换cudnn的版本,这样的话,需要重新配置和编译一下caffe,我比较懒,就没这么做。
    还有最简单的办法是: 直接关掉 cudnn 这样就不会报这个错误了

    接着 make all
    出现了下面这个错误
    我在编译单独caffe的时候,就已经把opencv安装好了,按理来说不应该出现这个错误

    .build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
    .build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
    .build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
    collect2: error: ld returned 1 exit status
    make: *** [.build_release/tools/convert_imageset.bin] Error 1

    我 google到了解决办法

    意思就是在 makefile.config里面加一个LIBRARIES

    我是这样加的  直接加在opencv下面

    # Uncomment if you're using OpenCV 3
     OPENCV_VERSION := 3
    LIBRARIES += glog gflags protobuf leveldb snappy 
    lmdb boost_system hdf5_hl hdf5 m 
    opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs

    再make all就通过了

  • 相关阅读:
    JS学习之构造函数、原型、原型链
    JS学习之面向对象(面向对象的创建方法,new运算符的工作原理)
    JS学习之事件流
    JS学习之生命周期与垃圾回收机制
    关于在XP操作系统和IIS5.1环境下的MVC环境搭建之IIS错误
    VS2010、.net 4.0下MVC3开发中Code First开发模式的数据迁移小结
    关于MVC3框架下的Jquery异步请求函数的学习心得之一——$.post()
    关于ASP调用存储过程的经典资料转载
    关于windows环境下的IIS 500内部服务器错误的一种解决办法
    接VS2010+Net+MVC3+EF4.1环境下的Code First一文的补充说明
  • 原文地址:https://www.cnblogs.com/YangQiaoblog/p/6756372.html
Copyright © 2011-2022 走看看