Raspberry Pi Pet Detector Camera Using Python, TensorFlow, and Twilio [video]
Very cool.  The Raspberry Pi is turning out to be a nice platform for little AI driven projects like this.<p>It&#x27;s not using machine learning, but I&#x27;m just now finishing up a Christmas present; a web accessible treat dispense with live video.  I know those exist commercially, but it has been a fun project to build one anyway.<p>Terrible quality pictures:<p><a href="https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;nesMdhy" rel="nofollow">https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;nesMdhy</a><p>Raspberry Pi Zero W for the brains; Pimoroni speaker hat; cheap stepper motor and bridge; IR emitter and transistor create an IR break beam to detect when treats are dispensed; Raspberry Pi camera for live video feed; all controlled by a custom AppEngine deployment which provides a nice web interface for dispensing treats, viewing the video, and even uploading their own sounds which get played before the treats come out.<p>The most difficult thing has been the mechanical engineering; something I have little to no experience with.  The whole CAD process took me a few weeks of working on and off.  Then another two weeks of printing and iterating the parts.  The main body itself is a 14 hour print even at high speed.  I ended up using FreeCAD for the whole design.  Not sure if that was a mistake or not.  I like supporting open source software, but ... I have this terrible notion that something like Fusion360 would have made the whole process 10x faster...  But it&#x27;s all printed and working!<p>Since this is going as a gift to someone else, I also had to take a lot of time to make it easy to use; it couldn&#x27;t just be a fiddly hack.  So, for example, I got a nice setup procedure built into it for setting up wifi.  You just hold the button on the back to put it into setup mode, and then show it a QR code on your phone with your Wifi network&#x27;s details.  And since there&#x27;s a speaker, I&#x27;m using some text-to-speech to walk them through the setup.  It turned out nice.<p>And using the magic of ffmpeg, I was able to get the Raspberry&#x27;s camera feed into an HLS stream, which gets securely uploaded to the AppEngine server.  So it&#x27;s a live video, rather than still pictures or delayed video uploads.  Was really happy when that got working.  (I use hls.js to handle desktop browser compatibility.  Works a treat.  Also, FFMpeg is supposed to be able to upload the HLS stream itself to a server, but that was broken or something; had to use some Python to pipe it manually.)<p>Just putting the finishing touches on the frontend now.  4 days to go... wish me luck!