From 17b22d7ce77cf37ac7d39b5ea3be76716c10cfdf Mon Sep 17 00:00:00 2001 From: Alexey <AlexeyAB@users.noreply.github.com> Date: Thu, 01 Mar 2018 00:10:32 +0000 Subject: [PATCH] Update Readme.md --- README.md | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f5a9ce..2f75fb3 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ This repository supports: * both Windows and Linux -* both OpenCV 3.x and OpenCV 2.4.13 +* both OpenCV 2.x.x and OpenCV <= 3.4.0 (3.4.1 and higher isn't supported) * both cuDNN v5-v7 * CUDA >= 7.5 * also create SO-library on Linux and DLL-library on Windows @@ -39,7 +39,7 @@ ##### Requires: * **Linux GCC>=4.9 or Windows MS Visual Studio 2015 (v140)**: https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409 (or offline [ISO image](https://go.microsoft.com/fwlink/?LinkId=615448&clcid=0x409)) * **CUDA 9.1**: https://developer.nvidia.com/cuda-downloads -* **OpenCV 3.x**: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.2.0/opencv-3.2.0-vc14.exe/download +* **OpenCV 3.4.0**: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.4.0/opencv-3.4.0-vc14_vc15.exe/download * **or OpenCV 2.4.13**: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.13/opencv-2.4.13.2-vc14.exe/download - OpenCV allows to show image or video detection in the window and store result to file that specified in command line `-out_filename res.avi` * **GPU with CC >= 2.0** if you use CUDA, or **GPU CC >= 3.0** if you use cuDNN + CUDA: https://en.wikipedia.org/wiki/CUDA#GPUs_supported @@ -281,6 +281,17 @@ * Also you can get result earlier than all 45000 iterations. +### How to train tiny-yolo (to detect your custom objects): + +Do all the same steps as for the full yolo model as described above. With the exception of: +* Download default weights file for tiny-yolo-voc: http://pjreddie.com/media/files/tiny-yolo-voc.weights +* Get pre-trained weights tiny-yolo-voc.conv.13 using command: `darknet.exe partial cfg/tiny-yolo-voc.cfg tiny-yolo-voc.weights tiny-yolo-voc.conv.13 13` +* Make your custom model `tiny-yolo-obj.cfg` based on `tiny-yolo-voc.cfg` instead of `yolo-voc.2.0.cfg` +* Start training: `darknet.exe detector train data/obj.data tiny-yolo-obj.cfg tiny-yolo-voc.conv.13` + +For training Yolo based on other models ([DenseNet201-Yolo](https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/densenet201_yolo.cfg) or [ResNet50-Yolo](https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/resnet50_yolo.cfg)), you can download and get pre-trained weights as showed in this file: https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/partial.cmd +If you made you custom model that isn't based on other models, then you can train it without pre-trained weights, then will be used random initial weights. + ## When should I stop training: Usually sufficient 2000 iterations for each class(object). But for a more precise definition when you should stop training, use the following manual: @@ -364,6 +375,8 @@ * for training on small objects, add the parameter `small_object=1` in the last layer [region] in your cfg-file * for training with a large number of objects in each image, add the parameter `max=200` or higher value in the last layer [region] in your cfg-file + + * to speedup training (with decreasing detection accuracy) do Fine-Tuning instead of Transfer-Learning, set param `stopbackward=1` in one of the penultimate convolutional layers, for example here: https://github.com/AlexeyAB/darknet/blob/cad4d1618fee74471d335314cb77070fee951a42/cfg/yolo-voc.2.0.cfg#L202 2. After training - for detection: -- Gitblit v1.10.0