When this build is running, it keeps an eye on a glass patio door and works out when a pet is waiting to come in. The camera feed gets checked by a pre-trained MobileNet SSD model from TensorFlow, which can pick out cats and dogs among other things. Once a pet's centre point sits inside one of the two marked zones for ten frames in a row, the system sends an SMS through the Twilio API, so the maker knows it is time to open the door. On screen, the feed prints 'Pet wants inside' or 'Pet wants outside' depending on where the animal was spotted.
The hardware side is tidy: a Raspberry Pi with a Picamera sits in a white plastic case with a hinged mount for the camera module, hooked up to a monitor, keyboard and mouse. Everything runs from a Python script called Pet_detector.py, which the maker walks through in Python IDLE, and the full setup instructions live in a GitHub tutorial. Two clever touches stand out to me. The zones are labelled 'Inside box' and 'Outside box' directly on the feed, and a 30-frame pause counter stops the system from firing off repeat messages after each alert. Both seem like smart, simple answers to real problems.
The price is hard to argue with at roughly $50 all in, about $30 for the Pi and $20 for the camera. The trade-off is speed: the frame rate sits somewhere between 0.4 and 1.38 FPS, since the maker says the task pushes the Pi to its computational limits. Heatsinks are recommended as the processor runs a little hot. The detection accuracy on cats and dogs is also not great with the stock model, and the maker hopes to deploy a custom trained one instead. It is an honest, well documented build all round.
Project by Edje Electronics. Watch it on their YouTube channel: