SSD or YOLO on raspberry pi

Saruman picture Saruman · Feb 20, 2017 · Viewed 8.8k times · Source

Is it possible to run SSD or YOLO object detection on raspberry pi 3 for live object detection (2/4frames x second)?

I've tried this SSD implementation in python but it takes 14 s per frame.

Answer

Arsenal Fanatic picture Arsenal Fanatic · Oct 5, 2017

I recently started looking into object detection for a project of mine and was wondering if am missing something to get stuff off the ground.

I want to implement a real time object detection system on a raspberry pi 3 for surveillance of an open spaces for eg a garden. I have already tried a few available solutions. I don't need to detect many classes(only 3 person,dog, bicycle) so maybe the fastest option can be retrained with fewer filters and parameters thereby decreasing the total compute time.

Darknet(YOLO) [https://github.com/pjreddie/darknet] Installed default darknet tested YOLOv2 and YOLO runs on a raspberry pi3 each frames runs for approx 450 secs for each image. Tiny YOLO had run for 40 seconds per image.

Tensorflow Google Object Detection (API)[https://github.com/tensorflow/models/blob/master/object_detection/g3doc/installation.md]: I had tried all available networks. The best performing one was SSD inception network which runs at 26 secs per image.

Microsoft Embedded Learning Library (ELL)[https://github.com/Microsoft/ELL]: I could not get this to work for some compilation reasons but will try to check it out again later. Please let me know If this worked for you and how it performs in Object detection tasks.

Darknet-NNPACK[https://github.com/thomaspark-pkj/darknet-nnpack]: Here the darknet was optimized for arm processors and had convolutions implemented with some kind of FFT implementations with speeds up stuff a lot.

I have achieved most promise from this but it has its problems.

Installed darknet tested YOLO(full v1) runs on a Raspberry Pi3 each image requires approx 45 secs which is 10x faster than default YOLO network. Tiny YOLO had run for 1.5 seconds per frame but gives no results.

This is possible bug reported due to version conflicts between the models and the cfg files. I have opened an github (issue)[https://github.com/thomaspark-pkj/darknet-nnpack/issues/13] a while back and yet to receive a response.

MXnet (SSD)[https://github.com/zhreshold/mxnet-ssd]: Port of SSD in Mxnet (not compiled with NNPACK) MXnet SSD resnet 50 per image 88 sec MXnet SSD inceptionv3 per image 35 sec

Caffe-YOLO[https://github.com/yeahkun/caffe-yolo]: Running caffe on yolo_small works with 24 sec per frame. Running caffe on yolo_tiny works with 5 sec per frame. This looks like the fastest of the one I have tried unless the darknet-nnpack issues could be solved.