etowahadams / leaf-detector

Predict bounding boxes for red maple (Acer rubrum) leaves

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Predict bounding boxes for red maple (Acer rubrum) leaves

License:Other


Languages

Language:C 63.2%Language:Cuda 14.6%Language:C++ 13.9%Language:Python 4.8%Language:CMake 1.5%Language:Batchfile 0.6%Language:PowerShell 0.5%Language:Shell 0.5%Language:Makefile 0.3%Language:C# 0.2%