Light version of convolutional neural network Yolo v3 & v2 for objects detection with a minimum of dependencies (INT8-inference, BIT1-XNOR-inference)
This repository supports:
- both Windows and Linux
- both OpenCV <= 3.3.0 and OpenCV 2.4.13
- both cuDNN >= 7.1.1
- CUDA >= 8.0
How to compile:
-
To compile for CPU just do
makeon Linux or buildyolo_cpu.slnon Windows -
To compile for GPU set flag
GPU=1in theMakefileon Linux or buildyolo_gpu.slnon WindowsRequired both CUDA >= 8.0 and cuDNN >= 7.1.1
How to start:
- Download
yolov3.weightsto thebindirectory and run./yolo.shon Linux (oryolo_cpu.cmd/yolo_gpu.cmdon Windows) - Download
yolov3-tiny.weightsto thebindirectory and run./tiny-yolo.sh
How to use INT8-inference:
- Use flag
-quantizedat the end of command, for example,tiny-yolo-int8.shoryolo_cpu_int8.cmd - For the custom dataset, you should use
input_calibration=parameter in your cfg-file, from the correspon cfg-file:yolov3-tiny.cfgoryolov3.cfg, ...
How to use BIT1-XNOR-inference - only for custom models (you should train it by yourself):
- You should base your cfg-file on
yolov3-spp_xnor_obj.cfgand train it by using this repository as usual https://github.com/AlexeyAB/darknet by using pre-trained filedarknet53_448_xnor.conv.74 - Then use it for Detection-test or for getting Accuracy (mAP):
./darknet detector test data/obj.names yolov3-spp_xnor_obj.cfg data/yolov3-spp_xnor_obj_5000.weights -thresh 0.15 dog.jpg./darknet detector map data/obj.data yolov3-spp_xnor_obj.cfg data/yolov3-spp_xnor_obj_5000.weights -thresh 0.15
Other models by the link: https://pjreddie.com/darknet/yolo/