https://blog.youkuaiyun.com/u010548772/article/details/79071524
问题1.AttributeError: ‘ProposalLayer’ object has no attribute ‘param_str_’
param_str_为param_str
问题2:KeyError: ‘1’
cfg_key = ‘TEST’#str(self.phase)
问题3:faster rcnn 无法打开包括文件:“stdbool.h”
https://bbs.youkuaiyun.com/topics/392191281
.\Anaconda2\Lib\distutils\msvc9compiler.py
Locate to line 304: VERSION = get_build_version()
replace it with : VERSION = 14.0
注:Install VCForPython27.msi 的方法是无效的,这个问题产生的原因就是因为找不到编译器
SET VS90COMNTOOLS=%VS140COMNTOOLS%也是无效的
https://blog.youkuaiyun.com/yi452873250/article/details/73848640 这个网址内容比较多
https://blog.youkuaiyun.com/zhangzm0128/article/details/71698880
问题4: no module named
pip install cython
pip install easydict
pip install pyyaml
pip install python-opencv
问题5:_caffe错误
1)添加层和文件
打开py-faster-rcnn\caffe-fast-rcnn\src\caffe\layers文件夹,找到4个文件分别为
然后copy到你新的caffe的对应文件夹caffe\src\caffe\layers里。
接着我们添加头文件,打开py-faster-rcnn\caffe-fast-rcnn\include\caffe,把fast_rcnn_layers.hpp这文件copy到caffe的对应文件夹下caffe\include\caffe。
2)配置2个新层
打开你的caffe\src\caffe\proto下的caffe.proto,进行编辑。
在407行左右
往原来的文件里添加新的层的配置信息
optional ROIPoolingParameter roi_pooling_param = 8266711;
optional SmoothL1LossParameter smooth_l1_loss_param = 8266712;
message ROIPoolingParameter {
// Pad, kernel size, and stride are all given as a single value for equal
// dimensions in height and width or as Y, X pairs.
optional uint32 pooled_h = 1 [default = 0]; // The pooled output height
optional uint32 pooled_w = 2 [default = 0]; // The pooled output width
// Multiplicative spatial scale factor to translate ROI coords from their
// input scale to the scale used when pooling
optional float spatial_scale = 3 [default = 1];
}
message SmoothL1LossParameter {
// SmoothL1Loss(x) =
// 0.5 * (sigma * x) ** 2 -- if x < 1.0 / sigma / sigma
// |x| - 0.5 / sigma / sigma -- otherwise
optional float sigma = 1 [default = 1];
}
再重新编译,编译完成后,把caffe-windows\Build\x64\Release\pycaffe\caffe 替换到py-faster-rcnn\caffe-fast-rcnn的python