https://hackaday.com/2019/03/07/raspberry-pi-camera-with-smarts-cloud-or-local/

RASPBERRY PI CAMERA WITH SMARTS — CLOUD OR LOCAL?

 

[Mark West] gave an interesting presentation at last year’s GOTO Copenhagen conference. He shows how he took a simple Raspberry Pi Zero webcam and expanded it with AI. He actually added the intelligent features in two different ways: on in the Amazon cloud and another using the Intel Modvidius NCS USB stick directly connected to the USB. You can see the video below.

Local motion detection uses some open source software. You simply configure it using a text file and it even handles the video streaming. However, at that point, you just have a web camera — not amazing, nor very cost effective. However, you get a lot of false alarms with the motion detection software. A random cat walking past, clouds, trees, or even rain would push [Mark] an email and after 250 alert e-mails a day, [Mark] decided to make something better.

[Mark’s] first pass was to use Amazon’s Rekognition service to process video. This allowed the camera to actually be smarter about what would trigger a detection event. In particular, the new camera only alarms if Rekognition sees a person in the frame.

This worked well, but there’s a cost associated with using a cloud service in this way. You can probably get a free trial and there’s some level of free usage. Eventually, though, you’ll wind up paying per image processed. With [Mark’s] four cameras, he wound up paying a little less than $30 per month. However, costs could increase if he sent more pictures to improve recognition.

Of course, it is possible to do more sophisticated processing without the cloud. The Pi isn’t the best platform for doing neural networks, but [Mark] found the Intel Movidius Neural Compute Stick (NCS). This USB device offers advanced neural network processing and lets the Pi offload most of the work to it. Of course, that increases the upfront cost but saves on future cloud fees. It also processes all frames, not just frames that show changed pixels. [Mark] noted that Google’s Edge TPU Accelerator could do the same task if it would ever actually go to the market. (Editor’s note: yesterday.)

We wondered if [Mark] could have made his own private cloud where all the PIs sent their data to one node with NCS to do the processing. We’ve done our own take on using the NCS. We also have looked at doing object detection using TensorFlow.