/darknet-NN-framework

Darknet is an open source neural network framework written in C and CUDA by Joseph Redmon.

Primary LanguageC

Darknet Neural Network Framework

Darknet is an open source neural network framework written in C and CUDA by Joseph Redmon.

Using Redmon's darknet framework I created my own implementation of YOLO (You Only Look Once) for my Kaptur logo recognition project. YOLO is a new approach to object detection that uses a single neural network to predict bounding boxes and class probabilities on full images in one evaluation (hence the name). The paper on YOLO is pretty easy to follow and nicely breaks down some machine learning concepts for none-PhDs like myself.

Custom features I added to the framework

  • Watch folder: Images that are dropped into the watch folder are added to a queue and then run through the network for logo detection.

    alt text

  • Threading for network predictions: Once the neural network's weights are loaded, multiple classifier threads are created to make predictions on images simultaneously. Before this only one image was processed at a time. On less powerful machines, like an AWS micro instance or a Raspberry pi, this doubles and sometimes triples the rate at which images are processed.

  • Load balancing of the queue: Provides a pool of threads that are used to drain the queue. The number of threads created depends on the available virtual memory and stack size. Sometimes threads hang, so instead of losing that image and prediction, the image is added back to the queue and re-run through another thread. This avoids some OOM problems and keeps everything running smoothly.

Results from YOLO

So far I've been really happy with the results that I've gotten with YOLO.

alt text alt text alt text alt text