前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >开源Fast R-CNN代码实现物体识别[通俗易懂]

开源Fast R-CNN代码实现物体识别[通俗易懂]

作者头像
全栈程序员站长
发布2022-09-13 09:50:14
1.4K0
发布2022-09-13 09:50:14
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

参考链接:https://blog.csdn.net/linolzhang/article/details/70306003

1.资源链接

代码下载链接:https://github.com/CharlesShang/TFFRCNN

训练好的网络下载链接:

在 TFFRCNN-master 下新建文件夹 model,存放要下载入的 net(参考 Github 下载地址),推荐下载:

2.VGG16 – TFFRCNN (0.689 mAP on VOC07):https://drive.google.com/file/d/0B_xFdh9onPagX0JWRlR0cTZ5OGc/view

3.VGG16 – TFFRCNN (0.748 mAP on VOC07):https://drive.google.com/file/d/0B_xFdh9onPagVmt5VHlCU25vUEE/view

5.Resnet50 – TFFRCNN (0.712 mAP on VOC07):https://drive.google.com/file/d/0B_xFdh9onPagbXk1b0FIeDRJaU0/view

2.Requirements: software

  1. Requirements for Tensorflow (see: Tensorflow)
  2. Python packages you might not have: cython, python-opencv, easydict (recommend to install: Anaconda

3.Requirements: hardware

  1. For training the end-to-end version of Faster R-CNN with VGG16, 3G of GPU memory is sufficient (using CUDNN)

4.Installation (sufficient for the demo)

1.Clone the Faster R-CNN repository

git clone https://github.com/CharlesShang/TFFRCNN.git

2.Build the Cython modules

代码语言:javascript
复制
           cd TFFRCNN/lib
           make # compile cython and roi_pooling_op, you may need to modify make.sh for your platform

我在编译过程中遇到了一些错误需要修改lib/make.sh文件(修改如下图红色部分), 我的文件内容如下:

—– Begin ——

#!/usr/bin/env bash TF_INC=(python -c ‘import tensorflow as tf; print(tf.sysconfig.get_include())’) echo TF_INC

TF_LIB=(python -c ‘import tensorflow as tf; print(tf.sysconfig.get_lib())’) echo TF_LIB

CUDA_PATH=/usr/local/cuda/

cd roi_pooling_layer

/usr/local/cuda-9.0/bin/nvcc -std=c++11 -c -o roi_pooling_op.cu.o roi_pooling_op_gpu.cu.cc \ -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_52

## if you install tf using already-built binary, or gcc version 4.x, uncomment the two lines below #g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o roi_pooling.so roi_pooling_op.cc \ # roi_pooling_op.cu.o -I TF_INC -fPIC -lcudart -L CUDA_PATH/lib64

# for gcc5-built tf #g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=1 -o roi_pooling.so roi_pooling_op.cc \g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o roi_pooling.so roi_pooling_op.cc \ roi_pooling_op.cu.o -I TF_INC -fPIC -lcudart -L CUDA_PATH/lib64 -L/usr/local/lib/python2.7/dist-packages/tensorflow -ltensorflow_framework \ -L/usr/local/cuda-9.0/targets/x86_64-linux/lib/ -L

# add building psroi_pooling layer cd psroi_pooling_layer /usr/local/cuda-9.0/bin/nvcc -std=c++11 -c -o psroi_pooling_op.cu.o psroi_pooling_op_gpu.cu.cc \ -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_52

g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o psroi_pooling.so psroi_pooling_op.cc \ psroi_pooling_op.cu.o -I TF_INC -fPIC -lcudart -L CUDA_PATH/lib64i -L/usr/local/lib/python2.7/dist-packages/tensorflow -ltensorflow_framework \ -L/usr/local/cuda-9.0/targets/x86_64-linux/lib/ -L

## if you install tf using already-built binary, or gcc version 4.x, uncomment the two lines below #g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o psroi_pooling.so psroi_pooling_op.cc \ # psroi_pooling_op.cu.o -I TF_INC -fPIC -lcudart -L CUDA_PATH/lib64

cd ..

—– End —–

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/160411.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.资源链接
    • 2.Requirements: software
      • 3.Requirements: hardware
        • 4.Installation (sufficient for the demo)
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档