Faster rcnn tensorflow 运行demo

一. cpu版demo

1. 下载 tf-faster-rcnn

git clone https://github.com/endernewton/tf-faster-rcnn.git

2.为了匹配本机的GPU,更新setup中的-arch,参照以下表格.(只验证了cpu版的)

cd tf-faster-rcnn/lib
# Change the GPU architecture (-arch) if necessary
vim setup.py
GPU model Architecture
TitanX (Maxwell/Pascal) sm_52
GTX 960M sm_50
GTX 1080 (Ti) sm_61
Grid K520 (AWS g2.2xlarge) sm_30
Tesla K80 (AWS p2.xlarge) sm_37

3.编译Cpython

make clean
make
cd ..

注意:
报错 ImportError: ../Lib/nms/gpu_nms.so: undefined symbol: _Py_ZeroStruct
原因:Makefile文件中 python setup.pypython demo.py版本不对应

4.准备数据

情况一:

/tf-faster-rcnn-master/data/demo

你可能感兴趣的:(Faster rcnn tensorflow 运行demo)