Faster-RCNN-TensorFlow-Python3 訓練自己的數(shù)據(jù)集

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__',

? ? ? ? ? ? ? ? '自己的類別')

模型保存參數(shù):默認迭代5000次保存一下訓練模型,修改config參數(shù)

lib/config.py

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

Run train.py

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

友情鏈接更多精彩內(nèi)容