faster-rcnn在编译时遇到的一些问题
1.在安装faster-rcnn事如果报这种错误
In file included from ./include/caffe/util/device_alternate.hpp::,
from ./include/caffe/common.hpp:,
from ./include/caffe/blob.hpp:,
from ./include/caffe/net.hpp:,
from ./include/caffe/solver.hpp:,
from ./include/caffe/sgd_solvers.hpp:,
from src/caffe/solvers/adam_solver.cpp::
./include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’:
./include/caffe/util/cudnn.hpp::: warning: enumeration value ‘CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING’ not handled in switch [-Wswitch]
switch (status) {
^
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, cudnnTensorDescriptor_t, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp::: error: too few arguments to function ‘cudnnStatus_t cudnnSetConvolution2dDescriptor(cudnnConvolutionDescriptor_t, int, int, int, int, int, int, cudnnConvolutionMode_t, cudnnDataType_t)’
pad_h, pad_w, stride_h, stride_w, , , CUDNN_CROSS_CORRELATION));
^
处理方案:
这种问题出现的原因是在rbg开源这套物体检查方案时是依据的当时最新的cundnn版本,而这么多年过去,cudnn已经发布了好几个版本,所以要处理这个问题,只需要将caffe框架下的所有cudnn相关的文件替换车成当前caffe最新的即可.
rbg的faster-rcnn模型代码地址: https://github.com/rbgirshick/py-faster-rcnn
cafe框架的代码地址: https://github.com/BVLC/caffe
进入faster-rcnn目录下py-caffe的src/caffe/util/cudnn.cpp 以及src/caffe/layers/cudnn*中的所有文件.还有include/util/cudnn.hpp 和include/layers/cudnn*.hpp中的文件全部替换成caffe中对应的文件.然后编译即可.
2.
python setup.py build_ext --inplace
Traceback (most recent call last):
File "setup.py", line , in <module>
CUDA = locate_cuda()
File "setup.py", line , in locate_cuda
raise EnvironmentError('The CUDA %s path could not be located in %s' % (k, v))
EnvironmentError: The CUDA lib64 path could not be located in /usr/lib64
Makefile:: recipe for target 'all' failed
make: *** [all] Error
这种问题是由于只需要将53行的第二个lib64换成lib即可.
3.安装opencv
sudo apt-get install python-opencv
4.
File "/home/gxjun/Qunar/py-faster-rcnn/tools/train_faster_rcnn_alt_opt.py", line , in get_roidb
roidb = get_training_roidb(imdb)
File "/home/gxjun/Qunar/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line , in get_training_roidb
imdb.append_flipped_images()
File "/home/gxjun/Qunar/py-faster-rcnn/tools/../lib/datasets/imdb.py", line , in append_flipped_images
assert (boxes[:, ] >= boxes[:, ]).all()
这种问题,一般都是清楚缓存,去cache下删除所有文件就可以了
5. 出现问题:训练faster rcnn时出现如下报错:
File "/py-faster-rcnn/tools/../lib/datasets/imdb.py", line 108, in append_flipped_images
assert (boxes[:, 2] >= boxes[:, 0]).all()
AssertionError
2、问题分析:
检查自己数据发现,左上角坐标(x,y)可能为0,或标定区域溢出图片
其实还存在一种问题,就是图片出现旋转问题.
6.
snapshot_prefix: "vgg16_rpn"
average_loss: 100
I0421 11:53:05.251756 24051 solver.cpp:81] Creating training net from train_net file: models/pascal_voc/VGG16/faster_rcnn_alt_opt/stage1_rpn_train.pt
F0421 11:53:05.251797 24051 io.cpp:36] Check failed: fd != -1 (-1 vs. -1) File not found: models/pascal_voc/VGG16/faster_rcnn_alt_opt/stage1_rpn_train.pt
*** Check failure stack trace: ***
将sovler.txt中的路径设置成绝对路径
7.
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line , in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line , in run
self._target(*self._args, **self._kwargs)
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/train_faster_rcnn_alt_opt.py", line , in train_fast_rcnn
max_iters=max_iters)
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line , in train_net
model_paths = sw.train_model(max_iters)
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line , in train_model
self.solver.step()
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/../lib/roi_data_layer/layer.py", line , in forward
blobs = self._get_next_minibatch()
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/../lib/roi_data_layer/layer.py", line , in _get_next_minibatch
return get_minibatch(minibatch_db, self._num_classes)
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/../lib/roi_data_layer/minibatch.py", line , in get_minibatch
num_classes)
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/../lib/roi_data_layer/minibatch.py", line , in _sample_rois
roidb['bbox_targets'][keep_inds, :], num_classes)
File "/media/gxjun/78289D37289CF4FA/py-faster-rcnn/tools/../lib/roi_data_layer/minibatch.py", line , in _get_bbox_regression_labels
bbox_targets[ind, start:end] = bbox_target_data[ind, :]
ValueError: could not broadcast input array from shape () into shape ()
这种问题,一般是model配置参数有问题.需要重新设置protxt中的参数.
8.
645 net.cpp:408] rpn_cls_prob_reshape -> rpn_cls_prob_reshape
F0810 10:54:11.421221 645 reshape_layer.cpp:80] Check failed: 0 == bottom[0]->count() % explicit_count (0 vs. 58320) bottom count (408240) must be divisible by the product of the specified dimensions (87480)
*** Check failure stack trace: ***
这种问题,一般是看对应的层的参数,比如这里是rpn_cls_prob参数有问题.
faster-rcnn在编译时遇到的一些问题的更多相关文章
- faster rcnn环境编译
步骤和fast rcnn的编译一样,在编译中遇到了一个问题: 刚开始是以为python-numpy没有安装到位,后来发现是Makefile.config的配置出现了问题.原来的配置是: PYTHON_ ...
- Faster rcnn代码理解(2)
接着上篇的博客,咱们继续看一下Faster RCNN的代码- 上次大致讲完了Faster rcnn在训练时是如何获取imdb和roidb文件的,主要都在train_rpn()的get_roidb()函 ...
- python 版Faster Rcnn
直接按照官网https://github.com/rbgirshick/py-faster-rcnn上的教程对faster Rcnn进行编译的时候,会发有一些层由于cudnn版本的更新,会报错如下: ...
- py faster rcnn的lib编译出错问题
真是好事多磨啊,计算机系统依然是14.04,而cuda依然是8.0,唯一不同的是时间不一样,下载的各种库版本有差别,GPU的driver不一样. 但是这样就出问题了,py-faster rcnn的li ...
- Tensorflow版Faster RCNN源码解析(TFFRCNN) (2)推断(测试)过程不使用RPN时代码运行流程
本blog为github上CharlesShang/TFFRCNN版源码解析系列代码笔记第二篇 推断(测试)过程不使用RPN时代码运行流程 作者:Jiang Wu 原文见:https://hom ...
- faster r-cnn 在CPU配置下训练自己的数据
因为没有GPU,所以在CPU下训练自己的数据,中间遇到了各种各样的坑,还好没有放弃,特以此文记录此过程. 1.在CPU下配置faster r-cnn,参考博客:http://blog.csdn.net ...
- Faster R-CNN在GPU下的安装、测试经历
在公司的服务器上安装faster rcnn时,遇到了不少问题: 1.cudnn版本不兼容的问题,解决办法参考: http://blog.csdn.net/WoPawn/article/details/ ...
- py faster rcnn+ 1080Ti+cudnn5.0
看了py-faster-rcnn上的issue,原来大家都遇到各种问题. 我要好好琢磨一下,看看到底怎么样才能更好地把GPU卡发挥出来.最近真是和GPU卡较上劲了. 上午解决了g++的问题不是. 然后 ...
- Widows下Faster R-CNN的MATALB配置(GPU)
目录 1. 准备工作 2. VS2013编译Caffe 3. Faster R-CNN的MATLAB源码测试 说在前面,这篇是关于Windows下Faster R-CNN的MATLAB配置,GPU版本 ...
随机推荐
- Oracle JDBC:驱动版本区别与区分 [转]
classes12.jar,ojdbc14.jar,ojdbc5.jar和ojdbc6.jar的区别,之间的差异 在使用Oracle JDBC驱动时,有些问题你是不是通过替换不同版本的Oracle ...
- CentOS中安装配置Nginx
一.安装Nginx '首先我们需要在nginx官网中下载nginx安装包,在这就下载最新版 nginx-1.13.7版本 下载完成以后我们进入下载页面进行查看 下载文件目录为 home/userNam ...
- CSS图片文字同行居中
img{ display:inline-block; vertical-align:middle; }
- css弹性盒子新旧兼容
前言:本篇随笔是对弹性盒子有了解的人来写的这篇文章,具体属性产生的效果这里不做说明,基础的东西去查文档.这里只是总结. 时至今日,css3的flex弹性盒子在移动端基本上都是支持的,但不排除有些些低版 ...
- Java-单例模式详解(图文并茂,简单易懂)
PS:首先我们要先知道什么是单例,为什么要用单例,用的好处是什么等问题来看. 1:java中单例模式是一种常见的设计模式,单例模式的写法有好几种,这里主要介绍两种:懒汉式单例.饿汉式单例单例模式有以下 ...
- eKing Cloud基础云平台演进之路
出口转内销.首发于公司微信公众号,作者本人,现转载到此.本来写得比较技术,还算有点干货,但是结果被编辑咔咔咔,就只剩下下面这些内容. 大型企业如何开启自己的快速上云之路? 2017-12-08 易建科 ...
- 基于telegraf+influxdb+grafana进行postgresql数据库监控
前言 随着公司postgresql数据库被广泛应用,尤其是最近多个项目在做性能测试的时候都是基于postgresql的数据库,为了确定性能瓶颈是否会出现在数据库中,数据库监控也被我推上了日程.在网上找 ...
- 多线程下QAxObject指针为NULL的解决办法
项目中需要对Excel进行操作,把数据中的数据写入到Excel文件中.在数据量大的情况下,操作Excel是一件费时的操作. 但是执行到下列代码时就会出现空指针的情况: QAxObject *excel ...
- Linux(CentOS6.5)下编译Popt报错”GNU gettext is required. The latest version”(gettext已经编译安装,但是没有安装在默认目录)的解决方案
本文地址http://comexchan.cnblogs.com/,作者Comex Chan,尊重知识产权,转载请注明出处,谢谢! 背景: 编译popt的时候出现下述报错. 直接vi查看confi ...
- 解析JSON的两种方法eval()和JSON.parse()
解析JSON 一种方法是使用eval函数. var dataObj = eval("("+json+")"); 必须把文本包围在括号中,这样才能避免语法错误,迫 ...