Faster-RCNN-TensorFlow-Python3 训练自己的数据集

Faster-RCNN-TensorFlow-Python3

Tensorflow Faster R-CNN for Windows and Linux by using Python 3

Currently, this repository supports Python 3.5, 3.6 and 3.7. Thanks to @morpheusthewhite

Train

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.

Install python packages (cython, python-opencv, easydict) by runningpip install -r requirements.txt (if you are using an environment manager system such as conda you should follow its instruction)

Go to  ./data/coco/PythonAPIRun python setup.py build_ext --inplaceRun python setup.py build_ext install 

Go to ./lib/utils and run python setup.py build_ext --inplace

Follow these instructions to download PyCoco database.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\VOC2007 

Download pre-trained VGG16 from here and place it as data\imagenet_weights\vgg16.ckpt.For rest of the models, please check here

修改类别

lib/pascal_voc.py

self._classes = ('__background__',

                '自己的类别')

模型保存参数:默认迭代5000次保存一下训练模型,修改config参数

lib/config.py

tf.app.flags.DEFINE_integer('snapshot_iterations',50,"Iteration to take snapshot")

Run train.py

你可能感兴趣的:(Faster-RCNN-TensorFlow-Python3 训练自己的数据集)