“My yard is under attack. That’s why I used a Raspberry Pi, a Pi camera, and some machine learning to catch my yard’s attackers in action.
My yard is under attack. Woodpeckers are drilling holes in my deck, something is living under (and destroying) my shed, and moles have dug a series of tunnels that rival most city’s subway systems.
I’ve watched a lot of war movies, so I know the first step to winning any war is to understand your enemy. And as a software developer, I’m constantly looking for an excuse to overengineer solutions to my problems.
That’s why I used a Raspberry Pi, a Pi camera, and a bit of machine learning to try to catch my yard’s attackers in action. More specifically, here’s a high-level overview of what I did.
- I put a Raspberry Pi in my yard.
- I connected a motion detector to the Pi.
- I connected a Pi camera to the Raspberry Pi.
- When the detector detects motion, I take a picture with the Pi camera.
- I analyze the photo using a machine-learning algorithm.
- If the photo contains an animal, I store the photo and send myself a notification.
- If the photo does not contain an animal, I delete the photo.”