Why this exists

I started beekeeping just over a year ago, right when varroa started showing up where I live past the Blue Mountains in NSW, Australia. I understand the need for varroa tests, but I hate that ~300 bees have to die in the process. That is where this project came from: what if we could detect varroa with computer vision instead of an alcohol wash?

How it works

I installed a transparent platform with a white ceiling in front of the hive and mounted a camera underneath, looking up at the bees' bottoms (because that's where mites are). The camera is a Raspberry Pi High Quality (HQ) Camera on a Raspberry Pi 5. Because it is manual focus, I paired it with a stepper motor and 3D-printed cogs to control focus.

Overall hive setup with platform and camera
Hive setup with platform and camera.
Front view of the hive entrance with the setup
Front view of the hive entrance.

I also built an autofocus program that uses a printed target with simple patterns to do the initial focus before recording.

Raspberry Pi with HQ camera and focus gear
Pi + HQ camera with focus gear.
Camera view of the hive platform
What the camera sees.

The Pi records 1-minute videos throughout the day. I process them on my laptop, where I train a model to extract bee crops. Those crops plus the videos are sent to this web server.

Live view with the detector running (15s loop).

Smart selection for annotations

The server samples crops from frames every second and injects them into the website (up to 1,000 pending crops). When a user finds a mite or pollen, a smart selection step pulls nearby frames with different priorities. Because it is a video, there is spatial correlation, so this boosts our chances of finding more mites.

All annotated crops feed back into training a better model to detect mites and measure pollen performance. Mites are sparse and hard to find. Together we can change that.

Build it yourself

I want this to be reproducible. The goal is to publish a public build guide with the model, 3D-print files, and parts list so anyone can set this up at home.

Core hardware: Raspberry Pi 5 + Raspberry Pi HQ Camera
Focus control: stepper motor + 3D-printed cogs
Optics target: printed autofocus target with simple patterns
Hive setup: transparent platform with white ceiling
Software: capture on Pi, process on laptop, upload crops + video

If you want to help build or test this at home, join the Discord and ask about the build.