Faster-rcnn模型下载

1、下载Faster-rcnn源码

caffe:

gitclone --recursive https://github.com/rbgirshick/py-faster-rcnn.git

tensorflow:

git clone --recursive https://github.com/smallcorgi/Faster-RCNN_TF.git

2、编译

进入目录cd py-faster-rcnn/lib

make

出现错误:

python setup.py build_ext --inplace
Traceback (most recent call last):
  File "setup.py", line 58, in <module>
    CUDA = locate_cuda()
  File "setup.py", line 46, in locate_cuda
    raise EnvironmentError('The nvcc binary could not be '
EnvironmentError: The nvcc binary could not be located in your $PATH. Either add it to your path, or set $CUDAHOME
make: *** [all] Error 1

解决办法是打开setup.py文件将以下注释,即可:

#CUDA = locate_cuda()

 #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']]
    #),
    #Extension(
    #    'pycocotools._mask',
    #    sources=['pycocotools/maskApi.c', 'pycocotools/_mask.pyx'],
    #    include_dirs = [numpy_include, 'pycocotools'],
    #    extra_compile_args={
    #        'gcc': ['-Wno-cpp', '-Wno-unused-function', '-std=c99']},
    #),

再次make

3、下载预训练模型:

运行py-faster-rcnn/data/scripts下的fetch_faster_rcnn_models.sh脚本文件下载

但这里我没有下载成功,估计需要翻墙,在网上看见下载种子,亲测可用

针对caffe结构的:

http://academictorrents.com/details/cca56021739c8a75af3b58f536d4930266c25d5e/tech

针对tensorflow架构:

https://github.com/leihe001/tensorflow-vgg

https://github.com/leihe001/tensorflow-resnet

4、最后运行demo

./tools/demo.py

好像需要安装cuda才能运行,cpu下运行不通过,原因未知!

5、本人初学faster-rcnn,望各位指教,有意者可交流学习!

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值