- Linux GCC>=4.9
- CUDA >= 7.5
- CuDNN >= 5.1
- OpenCV 3.3.0
- ffmpeg (with NVIDIA Support): https://developer.nvidia.com/ffmpeg
$ export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
$ export LD_LIBRARY_PATH=/usr/local/cuda8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
$ make
Download YOLOv2 or YOLOv3 weights
Preparing Videos and decode to images: Transcode to 608x608 & Take out 10 min video sample (Optional)
$ ffmpeg -c:v h264_cuvid -i input.mp4 -ss 00:00:00 -t 00:10:00 -vf scale=608:608 -c:v h264_nvenc output.mp4
Decode and save as images, with filenames defined in frame sequences
$ ffmpeg -i input.mp4 ./path/to/images/%7d.jpg
Generate filename lists, and the text file will be in ./data/train.txt; Remember to change path to images in generate-name.py
$ python genearte-name.py
Note: Can change to all availble cfg under./cfg
$ ./darknet detector test cfg/imagenet22k.dataset cfg/yolov3.cfg yolov3.weights -dont_show -ext_output < ./images.txt > result.txt
Inference results is in result.txt
/path/to/image/0000000.jpg,OB1,97% (left_x: xxx top_y: xxx width: xxx height: xxx)
/path/to/image/0000000.jpg,OB2,90% (left_x: xxx top_y: xxx width: xxx height: xxx)
/path/to/image/0000001.jpg,OB2,88% (left_x: xxx top_y: xxx width: xxx height: xxx)
/path/to/image/0000003.jpg,OB3,96% (left_x: xxx top_y: xxx width: xxx height: xxx)
/path/to/image/0000005.jpg,OB4,89% (left_x: xxx top_y: xxx width: xxx height: xxx)
...