YOLO (Darknet): How to detect a whole directory of images?

Written by- Sharif 12404 times views

To detect objects in a directory of images using YOLO (Darknet), you can use the detector function in Darknet. This function takes in the path to the directory containing the images, the path to the configuration file for YOLO, the path to the pretrained weights file for YOLO, and the path to the file where the detections should be saved.

Here's an example of how you can use the detector function to detect objects in a directory of images:

./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights /path/to/image/directory -dont_show
-ext_output -out /path/to/detection/output/file
This will run YOLO on all the images in the specified directory, and save the detections to the specified output file.

Note that you will need to have Darknet installed and set up on your system to use this command. You can find instructions for installing and setting up Darknet on the official

Darknet GitHub page: https://github.com/pjreddie/darknet

© aionlinecourse.com All rights reserved.