Beehive Hornet Detection System
- Role —
- Embedded Software Engineer
- Date —
- 2025
- Stack —
- Embedded C++, AI, Computer Vision, Audio Processing, IoT
Overview
Design and development of an embedded application running on a microcontroller to monitor the entrance of a beehive and automatically detect hornets, a natural predator that hunts bees right at the hive entrance.
I was responsible for the full development of the embedded application, from the acquisition services to the integration of the AI inference model and the local data storage system.
Context
Hornets are a major threat to beehives: they position themselves at the entrance, catch bees in flight, and can significantly weaken or destroy a colony over time.
The goal of the project was to build an autonomous embedded monitoring system, placed at the entrance of the beehive, capable of detecting hornet presence in real time using image and audio analysis, without requiring any permanent connection to a computer or the cloud.
The system needed to run entirely on-device, on a resource-constrained microcontroller, while remaining reliable enough to distinguish hornets from bees and other insects.
Challenge
The main challenges were:
- Run an AI inference model directly on a microcontroller with limited CPU, memory, and power resources
- Acquire and process image and audio data in real time
- Design a system architecture split into independent, cooperating services (image capture, audio capture, inference, storage)
- Select and adapt a TensorFlow Lite model compatible with embedded constraints (memory footprint, inference time)
- Correctly identify hornets while minimizing false positives (confusion with bees or other insects)
- Manage local data storage on an SD card without data loss or corruption
- Handle power and resource constraints typical of an outdoor, battery-powered embedded device
- Ensure the different services could run concurrently without blocking each other
- Keep the application robust and autonomous over long periods of unattended operation
My Contribution
I was responsible for the complete design and development of the embedded application, including:
- Defining the overall software architecture of the embedded application
- Developing the image acquisition service, capturing frames at the beehive entrance
- Developing the audio acquisition service, capturing sound near the entrance
- Integrating a TensorFlow (TensorFlow Lite) model for on-device inference
- Implementing the inference pipeline, feeding captured image/audio data to the AI model and processing its output
- Developing the local storage service, saving records (images, audio, detection results) onto an SD card
- Writing the embedded application in C++, optimized for the constraints of the target microcontroller
- Coordinating the different services (capture, inference, storage) so they run reliably together on-device
- Testing and tuning the detection pipeline against real hornet and bee activity at the hive entrance
Solution
An embedded application was developed to run autonomously on a microcontroller placed at the entrance of the beehive.
The application is organized as a set of cooperating services, each responsible for a specific part of the monitoring pipeline:
- An image capture service, periodically acquiring frames of the hive entrance
- An audio capture service, recording sound activity near the entrance
- An inference service, feeding the captured image/audio data into an embedded TensorFlow Lite model to detect the presence of a hornet
- A storage service, saving raw and/or processed records (images, audio, detection results) locally on an SD card for later review
When the AI model detects a hornet, the corresponding record is flagged and saved, allowing the beekeeper to review actual hornet events without having to monitor the hive continuously.
This architecture made it possible to run AI-based detection fully on-device, with no need for a permanent network connection, while keeping a traceable history of events on the SD card.