ron 实现

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下)
2.报错 

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的方法来解决)



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值