window10+tensorflow+Faster-RCNN

来源:互联网 发布:淘宝开网店好不好 编辑:程序博客网 时间:2024/04/26 04:02

(1)基本的配置,可以去百度,包括tensorflow numpy scipy Image什么的,注意安装顺序,和包的安装方式,最好都pip install

         从这里下载相应的wel,http://www.lfd.uci.edu/~gohlke/pythonlibs/

,然后安装

(2)在https://github.com/dBeker/Faster-RCNN-TensorFlow-Python3.5 下载了源码。然后按照他的read me 一步一步。

(3)- Install tensorflow, preferably GPU version. Follow [instructions]( https://www.tensorflow.org/install/install_windows). 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.


(4)Install python packages (cython, python-opencv, easydict)pip install 就好


(5)Checkout this branch


(6)编译,有坑,见上一篇文章Go to  ./data/coco/PythonAPI


      Run `python setup.py build_ext --inplace`


      Run `python setup.py build_ext install`


(7) Follow this instruction to download PyCoco database. [Link]( https://github.com/rbgirshick/py-faster-rcnn#beyond-the-demo-installation-for-training-and-testing-models)


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"
  
 (8) Download pre-trained VGG16 from [here](http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz) and place it as "data\imagenet_weights\vgg16.ckpt"
 
 For rest of the models, please check [here](https://github.com/tensorflow/models/tree/master/research/slim#pre-trained-models)
 
 (9)- Run train.py
  
  Notify me if there is any issue found. Please note that, I have compiled cython modules with sm61 architecture (GTX 1060, 1070 etc.). Compile support for other architectures will be added. 
 

在开始编译setup.py的时候,一直出现各种错误,比如找不到cant open vcvarsall.bat,改了vs的版本,还是有问题。在E:\Program Files\Anaconda3\Lib\distutils\_msvccompiler.py里面修改了if version >= 14 and version > best_version:将他改成更低版本,又出现了新的错误。最后重装vs2015解决了问题。


三个python库。


然后在编译运行setup.py就没有错了。运行train 可以用python 直接运行,也可以用 cmd   python train.py --run 运行。