Raspberry Pi used to count bees — Brazilian researchers use a Pi Zero 2 W and some AI to help keep hives healthy

Raspberry Pi
(Image credit: José Alberto Ferreira Filho, José Anderson Reis)

Researchers at the Federal University of Itajuba in Brazil, including professor José Alberto Ferreira Filho and master's degree student José Anderson Reis, have put together an excellent summer Raspberry Pi project that aims to help support local bee populations. It's important when running an apiary to keep track of your bees, but counting them can be incredibly tedious—that's why they've put together this great Raspberry Pi-powered bee counter they call BuzzTech.

The way it works is fairly straightforward, but it's far from simple when you look at the software side of the project. A camera is positioned facing toward the entrance to the hive and is connected to a Raspberry Pi, which implements an AI-powered system to keep track of how many bees are in the frame. This makes it possible to not just monitor the bees in real-time, but also track them over time.

Monitoring population sizes is critical to caring for bees. A significant change, like a sudden drop in population, suggests attention is needed to optimize their environment to prevent further loss. And without some novel tech, counting bees manually is pretty much your only option. 

As you can imagine, bees don't listen when you ask them to sit still for a count, so you'll only ever get a rough estimate. Implementing an AI-powered bee-counting device, however, eliminates much of the uncertainty and provides greater accuracy in these assessments.

Hardware-wise, it doesn't take much to recreate this project. It's mainly just a Raspberry Pi Zero 2 W and a camera module. This model has a few benefits, mainly it being the newest model of Pi Zero as well as its wireless support. Apart from that, all you need is a hive of bees to keep track of.

The Pi is running Raspberry Pi OS as a starting point, but where things get really interesting is in the programming. There are tons of cool AI tools to play with and, in this case, the team chose to implement YOLOv8. This handles all of the machine learning and AI functions, enabling BuzzTech to count the bees for you.

If you want to get a closer look at this Raspberry Pi project, head on over to Hackster and check it out—you won't even need a bee suit.

Ash Hill
Contributing Writer

Ash Hill is a contributing writer for Tom's Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.