MNC代码运行错误记录集锦
MNC代码运行错误记录集锦
上一篇博客介绍了MNC的理论知识,这篇主要介绍我在跑作者提供的源码时出现的一些错误,以及错误的解决方案。
上一篇博客介绍了MNC的理论知识,这篇 博客主要介绍我在跑作者提供的源码时出现的一些错误,以及错误的解决方案
MNC工程地址:https://github.com/daijifeng001/MNC
按照github上地址的installation guide 安装MNC。我当时安装的时候并不顺利,出现各种问题,下面是我在安装的过程遇到的一些错误,算是踩过的坑吧。
代码运行错误记录:
1.cudnn相关问题
由于MNC基于faster rcnn,而其中caffe版本较低,对cudnn版本要求较高,可能出现不兼容的问题,在编译MNC工程中的caffe-mnc时,需要把其中src/caffe/layers/目录下的关于cudnn的文件全部替换成最新版caffe中的文件。
2.编译lib文件错误
Question1.
ImportError:No module named Cython.Distutils
Solution1.
sudo pip install cython
Question2.
x86_64-linux-gnu-gcc: error:utils/bbox.c: No such file or directory
x86_64-linux-gnu-gcc: fatalerror: no input files
Solution2.
cd MNC/lib/utils
cython bbox.pyx
Question3.
x86_64-linux-gnu-gcc:error: nms/cpu_nms.c: No such file or directory
x86_64-linux-gnu-gcc:fatal error: no input files
Solution3.
cd MNC/lib/nms
cython cpu_nms.pyx
Question4.
AttributeError: 'module' object has no attribute 'text_format'
Solution4.
在MNC/train_net.py 文件中添加 mport google.protobuf.text_format
Question5.
AttributeError: 'module' object has no attribute 'text_format'
Solution5.
在MNC/train_net.py 文件中添加 mport google.protobuf.text_format
Question6.
TypeError: 'numpy.float64' object cannot be interpreted as an index
Solution6.
sudo pip install -U numpy==1.11.0
下面是按照成功运行后的实验结果
原图
实验结果
原图
实验结果