1.报错 (GPU报错)
[idc@slave1 RON]$ ./test_voc07.sh
Traceback (most recent call last):
File "./tools/test_net.py", line 12, in <module>
from fast_rcnn.test import test_net
File "/home/idc/deep/gjj/RON/tools/../lib/fast_rcnn/__init__.py", line 10, in <module>
from . import test
File "/home/idc/deep/gjj/RON/tools/../lib/fast_rcnn/test.py", line 12, in <module>
from fast_rcnn.nms_wrapper import nms
File "/home/idc/deep/gjj/RON/tools/../lib/fast_rcnn/nms_wrapper.py", line 9, in <module>
from nms.gpu_nms import gpu_nms
ImportError: /home/idc/deep/gjj/RON/tools/../lib/nms/gpu_nms.so: undefined symbol: PyUnicodeUCS2_Fo
解决方法:
-
编辑setup.py
cd $FRCN_ROOT/lib vim setup.py
-
将gpu_nms.pyx改为gpu_nms.cpp
#before Extension('nms.gpu_nms', ['nms/nms_kernel.cu', 'nms/gpu_nms.pyx'], ... #after Extension('nms.gpu_nms', ['nms/nms_kernel.cu', 'nms/gpu_nms.cpp'], ...
- 1
-
修改gpu_nms.c文件后缀为.cpp
cd $FRCN_ROOT/lib/nms mv gpu_nms.c gpu_nms.cpp(我的目录下没有gpu_nms.c,这步没有执行) rm gpu_nms.so (删除后要重新到lib目录下make下)
Traceback (most recent call last):
File "./tools/test_net.py", line 12, in <module>
from fast_rcnn.test import test_net
File "/home/idc/deep/gjj/RON/tools/../lib/fast_rcnn/__init__.py", line 10, in <module>
from . import test
File "/home/idc/deep/gjj/RON/tools/../lib/fast_rcnn/test.py", line 12, in <module>
from fast_rcnn.nms_wrapper import nms
File "/home/idc/deep/gjj/RON/tools/../lib/fast_rcnn/nms_wrapper.py", line 10, in <module>
from nms.cpu_nms import cpu_nms
ImportError: /home/idc/deep/gjj/RON/tools/../lib/nms/cpu_nms.so: undefined symbol: PyUnicodeUCS2_Format
解决方法:
在博客http://www.cnblogs.com/justinzhang/p/5386837.html找到解决方法:在根目录下的lib/fast_rcnn里找到nms_wrapper.py:注释一句话from nms.cpu_nms import cpu_nms,如图:
3.[idc@slave1 RON]$ ./test_voc07.sh
Traceback (most recent call last):
File "./tools/test_net.py", line 14, in <module>
from datasets.factory import get_imdb
File "/home/idc/deep/gjj/RON/tools/../lib/datasets/__init__.py", line 8, in <module>
from .imdb import imdb
File "/home/idc/deep/gjj/RON/tools/../lib/datasets/imdb.py", line 10, in <module>
from utils.cython_bbox import bbox_overlaps
ImportError: /home/idc/deep/gjj/RON/tools/../lib/utils/cython_bbox.so: undefined symbol: PyUnicodeUCS2_Format
解决方法:
模仿方法1,去setup.exe中找到utils.cython_bbox",的地方,将下一行的 ["utils/bbox.c"],改成 ["utils/bbox.cpp"],,然后到utils目录下将mv bbox.c bbox.cpp, rm cython_bbox.so,再退出到lib目录,重新make
4.pycocotools/_mask.so: undefined symbol: ....
cd lib
cd pycocotools
cython _mask.pyx
(个人感觉前面的三个问题都可以用这个cython的方法来解决)