编译py-faster-rcnn的问题汇总及解决方法

按照官网 的提示,我开始安装faster rcnn,但是出现了很多问题,我将其汇总了起来,并提出了解决办法。
先说明一下我的配置:

  • python : anaconda2
  • linux: centos 6.9

安装faster rcnn请先参考:《cuda8+cudnn4 Faster R-CNN安装塈运行demo》
《使用cuDNN5编译py-faster-rcnn错误:cudnn.hpp(126): error: argument of type “int” is incompatible …》 ,要先合一下版本。

问题及解决方法

1.第三步Build the Cython modules 出现如下错误:

解决方法:
这个问题困扰了我好久,经过不断查阅资料,我终于解决了此问题。该问题主要是anaconda的 distutils.extension 在编译nms.gpu_nms出现的问题。
我的解决方法:
先定位到$FRCN_ROOT/lib,再打开setup.py,注释掉nms.gpu_nms模块:

#    Extension('nms.gpu_nms',
#        ['nms/nms_kernel.cu', 'nms/gpu_nms.pyx'],
#        library_dirs=[CUDA['lib64']],
#        libraries=['cudart'],
#        language='c++',
#        runtime_library_dirs=[CUDA['lib64']],
#         # this syntax is specific to this build system
#         # we're only going to use certain compiler args with nvcc and not with
#         # gcc the implementation of this trick is in customize_compiler() below
#        extra_compile_args={'gcc': ["-Wno-unused-function"],
#                            'nvcc': ['-arch=sm_35',
#                                     '--ptxas-options=-v',
#                                     '-c',
#                                     '--compiler-options',
#                                     "'-fPIC'"]},
#        include_dirs = [numpy_include, CUDA['include']]
#    ),

然后先编译其他三个模块bbox,nms.cpu_nms,pycocotools._mask。
等到编译结束后,再回过来将上面的注释去掉,重新编译,会发现出现刚才的问题,此时&#

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值