This project uses AlexeyDB's fork of Darknet Yolo that runs on Windows and Linux. Neural networks Yolov4 and YoloV3-spp-tiny are trained on potholes detection task with good news.
Video: https://drive.google.com/open?id=10ggaKaNdvNXNPDodZlATNeNi3U_ICt5G Weights: https://drive.google.com/open?id=1iBoLj_rU20c-c4j5iu17JoqOXExK_mXZ
Download the weight of the model YoloV4 or Yolov3-spp-tiny.
-
Clone the precursor repository AlexeyDB's fork into this repository.
-
Ensure that the Requirements for this project are met. Visit the Setup page for information on setting up your environment.
-
Replace the Makefile with the one in the repository specified above or configure the file accordingly. For example the Makefile in the root folder of this repository is write to works on Google Colab environment, usually works well with the most of GPUs.
To adapt make file in order to running on CPUs move Makefile_to_CPU.sh and run:
sh ./Makefile_to_CPU.sh
-
Run make in the root of the project.
-
If
darknet
has compiled successfully, running ./darknet in the root of the project should return: -
Place the files
obj.names
,obj.data
,train.txt
,test.txt
, and data/ directory of the project. If you want perform a small test you can also usetrain_small.txt
,test_small.txt
,obj_small.data
. -
Create directory
pothole_weights
ad move into the weights file. -
Place the files
cfg/yolov3-spp-pothole-test.cfg
orcfg/cfg/yolov4-spp-pothole-test.cfg
, cfg/ directory of the project.
*-train.cfg versions are used for the training phase. As be reported in original repository,input images with higher resolution in the prediction phase can increase significantly the accuracy. -
Download the dataset and place the files in .date/Pothole/ :
Images Dataset: https://drive.google.com/open?id=1QFowuq_xW
Labesl Dataset: https://drive.google.com/open?id=1U4mbdx-wmWqSJZZiuoSBrP4g_6XeGzNx
So now we have all the correct files in the darknet folder
For image files:
./darknet detector test data/obj.data cfg/yolov4-spp-pothole-test.cfg <trained_weight_file> <image_file>
For video files:
./darknet detector demo data/obj.data cfg/yolov4-spp-pothole-test.cfg <trained_weight_file> <video_file> -out_filename <video_output>.avi
!!! Soon more info and a better Readme.... !!!