| | |
| | | |  |  https://arxiv.org/abs/1612.08242 | |
| | | |---|---| |
| | | |
| | | |  |  https://arxiv.org/abs/1612.08242 | |
| | | |  |  https://arxiv.org/abs/1612.08242 | |
| | | |---|---| |
| | | |
| | | |
| | |
| | | More details: http://pjreddie.com/darknet/yolo/ |
| | | |
| | | ##### Requires: |
| | | * **MS Visual Studio 2015 (v140)**: https://www.microsoft.com/download/details.aspx?id=48146 |
| | | * **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 8.0 for Windows x64**: https://developer.nvidia.com/cuda-downloads |
| | | * **OpenCV 2.4.9**: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.9/opencv-2.4.9.exe/download |
| | | - To compile without OpenCV - remove define OPENCV from: Visual Studio->Project->Properties->C/C++->Preprocessor |
| | |
| | | |
| | | 5. If you want to build with CUDNN to speed up then: |
| | | |
| | | * download and install CUDNN: https://developer.nvidia.com/cudnn |
| | | * download and install **cuDNN 5.1 for CUDA 8.0**: https://developer.nvidia.com/cudnn |
| | | |
| | | * add Windows system variable `cudnn` with path to CUDNN: https://hsto.org/files/a49/3dc/fc4/a493dcfc4bd34a1295fd15e0e2e01f26.jpg |
| | | |
| | |
| | | `..\..\3rdparty\lib\x64\pthreadVC2.lib;cublas.lib;curand.lib;cudart.lib;cudnn.lib;%(AdditionalDependencies)` |
| | | - (right click on project) -> properties -> C/C++ -> Preprocessor -> Preprocessor Definitions |
| | | |
| | | `OPENCV;_TIMESPEC_DEFINED;_CRT_SECURE_NO_WARNINGS;GPU;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)` |
| | | |
| | | - open file: `\src\yolo.c` and change 3 lines to your OpenCV-version - `249` (for 2.4.9), `2413` (for 2.4.13), ... : |
| | | |
| | | * `#pragma comment(lib, "opencv_core249.lib")` |
| | | * `#pragma comment(lib, "opencv_imgproc249.lib")` |
| | | * `#pragma comment(lib, "opencv_highgui249.lib")` |
| | | |
| | | `OPENCV;_TIMESPEC_DEFINED;_CRT_SECURE_NO_WARNINGS;GPU;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)` |
| | | - compile to .exe (X64 & Release) and put .dll-s near with .exe: |
| | | |
| | | `pthreadVC2.dll, pthreadGC2.dll` from \3rdparty\dll\x64 |
| | |
| | | |
| | | 5. Run command: `type 2007_train.txt 2007_val.txt 2012_*.txt > train.txt` |
| | | |
| | | 6. Start training by using `train_voc.cmd` or by using the command line: `darknet.exe detector train data/voc.data yolo-voc.cfg darknet19_448.conv.23` |
| | | 6. Set `batch=64` and `subdivisions=8` in the file `yolo-voc.cfg`: [link](https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/yolo-voc.cfg#L3) |
| | | |
| | | 7. Start training by using `train_voc.cmd` or by using the command line: `darknet.exe detector train data/voc.data yolo-voc.cfg darknet19_448.conv.23` |
| | | |
| | | If required change pathes in the file `build\darknet\x64\data\voc.data` |
| | | |
| | |
| | | |
| | | 1. Create file `yolo-obj.cfg` with the same content as in `yolo-voc.cfg` (or copy `yolo-voc.cfg` to `yolo-obj.cfg)` and: |
| | | |
| | | * change line batch to [`batch=64`](https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/yolo-voc.cfg#L3) |
| | | * change line subdivisions to [`subdivisions=8`](https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/yolo-voc.cfg#L4) |
| | | * change line `classes=20` to your number of objects |
| | | * change line #224 from [`filters=125`](https://github.com/AlexeyAB/darknet/blob/master/cfg/yolo-voc.cfg#L224) to `filters=(classes + 5)*5` (generally this depends on the `num` and `coords`, i.e. equal to `(classes + coords + 1)*num`) |
| | | * change line #237 from [`filters=125`](https://github.com/AlexeyAB/darknet/blob/master/cfg/yolo-voc.cfg#L237) to `filters=(classes + 5)*5` (generally this depends on the `num` and `coords`, i.e. equal to `(classes + coords + 1)*num`) |
| | | |
| | | For example, for 2 objects, your file `yolo-obj.cfg` should differ from `yolo-voc.cfg` in such lines: |
| | | |
| | |
| | | |
| | |  |
| | | |
| | | 2.1. At first, you should put filenames of validation images to file `data\voc.2007.test` (format as in `train.txt`) or if you haven't validation images - simply copy `data\train.txt` to `data\voc.2007.test`. |
| | | 2.1. At first, in your file `obj.data` you must specify the path to the validation dataset `valid = valid.txt` (format of `valid.txt` as in `train.txt`), and if you haven't validation images, just copy `data\train.txt` to `data\valid.txt`. |
| | | |
| | | 2.2 If training is stopped after 9000 iterations, to validate some of previous weights use this commands: |
| | | |
| | |
| | | |
| | | 1. Before training: |
| | | * set flag `random=1` in your `.cfg`-file - it will increase precision by training Yolo for different resolutions: [link](https://github.com/AlexeyAB/darknet/blob/47409529d0eb935fa7bafbe2b3484431117269f5/cfg/yolo-voc.cfg#L244) |
| | | |
| | | * desirable that your training dataset include images with objects at diffrent: scales, rotations, lightings, from different sides |
| | | |
| | | 2. After training - for detection: |
| | | |