windows10+tensorflow+faster RCNN的实现
首先明确一点,在Linux系统下通过tensorflow实现faster RCNN相对简单,可以对代码进行编译(make),Windows并没有编译的功能,当然可以通过安装编译器实现在windows下的make,如何不熟悉,坑比较多,谨慎。
如果要在Windows先跑通fasterRCNN就应下载一个已经编译好的代码,这里推荐https://github.com/dBeker/Faster-RCNN-TensorFlow-Python3.5 下载源码。然后按照他的read me 一步一步执行。
注:以下过程都是在cmd,激活自己tensorflow环境下执行的,我用的python3.5.0所以环境名字为py350,而且很关键一点,Faster-RCNN-TensorFlow-Python3.5是在3.5的环境下编译的,所以必须为3.5的环境才能跑。

How To Use This Branch
1- Install tensorflow, preferably GPU version. Follow instructions. If you do not install GPU version, you need to comment out all the GPU calls inside code and replace them with relavent CPU ones.
2- Install python packages (cython, python-opencv, easydict)
3- Checkout this branch
前面三步基本没有问题,第四步:
4- Go to ./data/coco/PythonAPI
Run python setup.py build_ext --inplace
Run python setup.py build_ext install
这一步容易出现各种问题,如果缺少什么就直接pip install
执行这一步时注意:coco是微软的哦,所以必须安装好vs,(不装会出现cant open vcvarsall.bat这样的问题)我的环境中安装的vs2015,其实不用全安装vs太大了,安装他的一个环境即可大概三四兆的样子,具体自行百度。
5- Follow this instruction to download PyCoco database. Link
I will be glad if you can contribute with a batch script to automatically download and fetch. The final structure has to look like
"data/VOCDevkit2007/annotations_cache"
"data/VOCDevkit2007/VOC2007"
6- Download pre-trained VGG16 from here and place it as "data\imagenet_weights\vgg16.ckpt"
For rest of the models, please check here
这几步是下载数据集,按着步骤进行下载即可,也可自行百度下载,下载解压后放到指定位置没太大问题,需要注意的一点是下载下来的网络名称为vgg_16.ckpt,必须改为vgg16.ckpt。这点很重要,我就困住了好久。
最后一步执行在目标目录下运行train.py即可。
最后提示下,根据经验win10下如果没有gpu可下载1.3.0的tf,其他版本出问题的概率较大,一堆坑,有gpu的根据你的CUDA下相应TF就行,我CUDA9.0,对应下的1.10,可以运行,1.8的应该也可以。
