Skip to content
Predict bounding boxes for red maple (Acer rubrum) leaves
C Cuda C++ Python CMake Batchfile Other
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead, 78 commits behind AlexeyAB:master.

README.md

Maple Leaf Detector

Custom object detection with Yolov3 (paper), using AlexeyAB's framework. Trained on 800 images of Acer rubrum for 3500 batches, starting with the pre-trained yolov3.weights. Training set images downloaded from iNaturalist and labeled with LabelImg.

Image with bounding boxes

Installation

$ git clone https://github.com/etowahs/darknet.git
$ cd darknet
$ make                   <-- for Linux only

If you have CUDA installed on your computer, you may want to have GPU=1 in Makefile to have faster detection. See addtional instructions for Linux and Windows.

Download trained weights from here (235MB) and place it in the darknet folder.

Detecting Leaves

To run the detector on a single image:

$ cd darknet 
$ ./darknet detector test custom/darknet.data custom/yolov3.cfg leaf.weights -ext_output my-image.jpg

To run the detector on an entire folder of images, create a .txt file containing the file locations of all the images. Ex. my-imgs.txt

$ ./darknet detector test custom/darknet.data custom/yolov3.cfg leaf.weights -ext_output < my-imgs.txt > output.txt
You can’t perform that action at this time.