The write-up
How squirrel of interest is built
a camera that learns one squirrel
ML · hardware
What
A Raspberry Pi that watches the power pole outside a window all day and learns to tell one squirrel from the leaves, the wind and the bare pole.
Why
So the camera gets better on its own: every night it retrains on what it got wrong that day.
How
YOLO11n on the Pi judges each moving box twice a second, SigLIP on a PC double-checks it, and Aarav or Claude settles what they disagree on. A new model goes live only if it beats the live one on pictures neither has seen.
Built with
- Python 3.13
- Raspberry Pi 5
- OpenCV
- Ultralytics YOLO11n
- PyTorch
- SigLIP
By the numbers
- retrains on the Pi, each one tested before it goes live
- 31
- lines of source
- 9,134
- commits in 8 days
- 27
- tests
- 62
- things that moved, each one boxed and judged
- 13,611
- crops double-checked by a second model
- 76,345
- wires and a pole, mapped by hand
- 5
- live video feeds: numbers, paths and blurred clips instead
- 0
Languages
| Python | 6,834 | 74.8% |
| HTML / CSS | 1,850 | 20.3% |
| JavaScript | 450 | 4.9% |
On the wire
- Camera
- a USB webcam in a window, 1280×720 at 30 frames a second
- Tracker
- a box around anything that moves on the pole or the wires
- Checker
- YOLO11n on the Pi decides, twice a second, whether a box is him
- Teacher
- SigLIP on a PC double-checks, and disagreements go to Aarav or Claude
- Page
- the Pi uploads numbers and paths every 2 minutes, and blurred clips of him at night
Every night
- Label from reviews
- Weight the misses
- Retrain on the Pi
- Test against the live one
- Go live, or not
APIs
- V4L2 camera controls
- FastAPI
- SQLite
- Open-Meteo
- ffmpeg
Also
31 retrains in 30 days, and one rollback when they learned the leaves.