faster rcnn 错误整理集锦 caffe + ubuntu16.04 + cuda8.0 + python2.7

(1)
/usr/bin/ld: warning: libcudart.so.8.0, needed by /usr/local/lib/libopencv_core.so, may conflict with libcudart.so.7.5



Solution:

I have solved this problem.When I type ldd ./build/tools/caffe | grep cuda, I get

libcudart.so.7.0 => /usr/lib/libcudart.so.7.0 (0x00007f156953f000)
libcudnn.so.5 => /usr/local/cuda-8.0/lib64/libcudnn.so.5 (0x00007f155bd05000)
Some *.so of cuda7 didn't be removed. After I delete them, everything is fine.






(2)
F0305 14:22:46.973613 25399 math_functions.cu:394] Check failed: status == CURAND_STATUS_SUCCESS (201 vs. 0)  CURAND_STATUS_LAUNCH_FAILURE
*** Check failure stack trace: ***
    @     0x7fa3f9e325cd  google::LogMessage::Fail()
    @     0x7fa3f9e34433  google::LogMessage::SendToLog()
    @     0x7fa3f9e3215b  google::LogMessage::Flush()
    @     0x7fa3f9e34e1e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7fa3f563bf74  caffe::caffe_gpu_rng_uniform<>()
    @           0x792d5d  caffe::RandomNumberGeneratorTest_TestRngUniformTimesUniformGPU_Test<>::TestBody()
    @           0x918e13  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0x91242a  testing::Test::Run()
    @           0x912578  testing::TestInfo::Run()
    @           0x912655  testing::TestCase::Run()
    @           0x91392f  testing::internal::UnitTestImpl::RunAllTests()
    @           0x913c53  testing::UnitTest::Run()
    @           0x46d7ad  main
    @     0x7fa3f47af830  __libc_start_main
    @           0x475239  _start
    @              (nil)  (unknown)
Makefile:526: recipe for target 'runtest' failed
make: *** [runtest] Aborted (core dumped)


Solution:换个好使的Makefile.config就行啦!




(3)
src/caffe/test/test_smooth_L1_loss_layer.cpp:11:35: fatal error: caffe/vision_layers.hpp: No such file or directory
compilation terminated.
Makefile:581: recipe for target '.build_release/src/caffe/test/test_smooth_L1_loss_layer.o' failed
make: *** [.build_release/src/caffe/test/test_smooth_L1_loss_layer.o] Error 1


Solution:修改文件/home/xbb/RRPN/caffe-fast-rcnn/src/caffe/test/test_smooth_L1_loss_layer.cpp
	 删除或注释第11行:#include "caffe/vision_layers.hpp"




opencv-3.1.0在Ubuntu系统上使用g++编译时出现“/usr/bin/ld: cannot find -lippicv ” 错误及其解决办法



Solution:opencv-3.1.0/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/

然后将里面的压缩包ippicv_linux_20151201.tgz解压出来得到ippicv_lnx,最后进入其lib目录使用如下的命令:$ sudo cp libippicv.a /usr/local/lib 
把对应的库文件 libippicv.a文件cp到/usr/local/lib下面就可以了



(4)
1017 02:21:28.060667 16224 sgd_solver.cpp:106] Iteration 9980, lr = 0.001  
speed: 0.051s / iter  
Traceback (most recent call last):  
  File "./tools/train_net.py", line 112, in <module>  
    max_iters=args.max_iters)  
  File "/home/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 160, in train_net  
    model_paths = sw.train_model(max_iters)  
  File "/home/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 108, in train_model  
    model_paths.append(self.snapshot())  
  File "/home/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 73, in snapshot  
    self.bbox_stds[:, np.newaxis])  
ValueError: operands could not be broadcast together with shapes (84,1024) (8,1)



Solution:VGG16 Train.prototxt

Line 530行:

        num_classes:”2‘’修改成 类型数+1(背景算一类);

Line 620行:

        num_output  同上;

Line 643行:

        num_output: 8  

(类别数+1)* 4 ,“4”是指bbox的四个角
	roi_data层的num_classes:n





(5)
/home/xbb/py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:48: RuntimeWarning: overflow encountered in exp
  pred_w = np.exp(dw) * widths[:, np.newaxis]
/home/xbb/py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:49: RuntimeWarning: overflow encountered in exp
  pred_h = np.exp(dh) * heights[:, np.newaxis]
/home/xbb/py-faster-rcnn/tools/../lib/rpn/proposal_layer.py:175: RuntimeWarning: invalid value encountered in greater_equal
  keep = np.where((ws >= min_size) & (hs >= min_size))[0]
./experiments/scripts/faster_rcnn_end2end.sh: line 57:  5414 Floating point exception(core dumped) 
./tools/train_net.py --gpu ${GPU_ID} --solver models/${PT_DIR}/${NET}/faster_rcnn_end2end/solver.prototxt 
--weights data/imagenet_models/${NET}.v2.caffemodel --imdb ${TRAIN_IMDB} --iters ${ITERS} 
--cfg experiments/cfgs/faster_rcnn_end2end.yml ${EXTRA_ARGS}


Solution:




(6)
/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1


Solution:暂时没有解决




(7)
make test#运行报错:src/caffe/test/test_smooth_L1_loss_layer.cpp:11:35: fatal error: caffe/vision_layers.hpp  


Solution:找到文件caffe-fpn/src/caffe/test/test_smooth_L1_loss_layer.cpp 
         删除第十一行 #include "caffe/vision_layers.hpp"




(8)
In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,
                 from /usr/include/boost/python/args.hpp:8,
                 from /usr/include/boost/python.hpp:11,
                 from src/caffe/layer_factory.cpp:4:
/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory



Solution: 
	添加环境变量,sudo gedit ~/.bashrc 
	export CPLUS_INCLUDE_PATH=/usr/include/python2.7


(9)
In file included from src/caffe/util/cudnn.cpp:2:0:
./include/caffe/util/cudnn.hpp:8:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory
compilation terminated.
Makefile:563: recipe for target '.build_release/src/caffe/util/cudnn.o' failed
make: *** [.build_release/src/caffe/util/cudnn.o] Error 1



Solution:
	# 当前目录为caffe,如不是,执行cd caffe

	$protoc src/caffe/proto/caffe.proto --cpp_out=.      
        $ mkdir include/caffe/proto
        $ mv src/caffe/proto/caffe.pb.h include/caffe/proto



(10)
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:1:10: fatal error: 'Python.h' file not found
#include <Python.h>  // NOLINT(build/include_alpha)
         ^
1 error generated.
make: *** [python/caffe/_caffe.so] Error 1


Solution:修改Makefile.config里面的
	# We need to be able to find libpythonX.X.so or .dylib.
	PYTHON_LIB := /usr/lib
	# PYTHON_LIB := $(ANACONDA_HOME)/lib

猜你喜欢

转载自blog.csdn.net/bingbingxie1/article/details/80012238
今日推荐