采用的faster-RCNN的代码:https://github.com/CharlesShang/TFFRCNN
安装TF版本的faster-RCNN会出各种问题,针对具体问题还是具体分析吧,首先笔者的python版本是python3以上的,但是github找到的都是2.7版本的,修改到3.6版本的花的时间有点长,大家不想自己修改的可以私信我,变动不大,就不列出自己修改后的github上的代码了。参考修改的3.6的代码可以在网盘中取用链接:https://pan.baidu.com/s/1KqAzDM8xR1_avXxmvBdG8A
提取码:hwt5
运行期间遇见了undefined symbol: _ZTIN10tensorflow8OpKernelE报错,主要是lib下的make.sh的问题,参考https://www.jianshu.com/p/d714073594b6
自己修改的make.sh我列一下,供大家参考:
#!/usr/bin/env bash
TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
echo $TF_INC
CUDA_PATH=/usr/local/cuda/
cd roi_pooling_layer
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 -ar