The Hivora Sense is a bait trap with a camera. It photographs from above whatever flies in. That tells me whether an Asian hornet (Vespa velutina) was there. What it doesn’t tell me is how it arrives.
Does it fly straight at the Hivora Sense or circle for a while first? Does it land on the rim and walk in? Does it come alone, or do several arrive in quick succession? And how long does it stay?
To find out, I built a second camera. It stands next to the Hivora Sense and watches it from the side. It doesn’t film continuously; it only starts recording when it detects a hornet itself.

At a glance
- What: A second camera next to the Hivora Sense that detects Asian hornets (Vespa velutina) with AI and then starts a video by itself.
- Hardware: Raspberry Pi 4 or 5, Raspberry Pi HQ Camera with an interchangeable lens, Google Coral USB Accelerator and a weatherproof 3D-printed case.
- Detection: AI model from the Hivora project at 960 pixels resolution, about one check per second (0.9 s with the Coral instead of 2.5 s without).
- Recording: 5 minutes in Full HD with 5 seconds of pre-roll, triggered by 2 hits in 3 consecutive checks; plus the triggering image and a JSON file with all detections.
- Based on: the Mini AI Camera by Luke Ditria and the “Mini AI Camera Solar” case from Printables, both adapted.
- First result: a recording on the very first day, an Asian hornet detected with 52–67 % confidence, 27 detections in five minutes.
The basis: a trail camera with a Raspberry Pi
I didn’t have to reinvent the wheel. The starting point was the Mini AI Camera by Luke Ditria, featured on Hackaday. Luke uses a Raspberry Pi Zero 2W with the Raspberry Pi AI Camera, which runs the AI model directly on its sensor, and puts everything in a 3D-printed case.
For my purpose I changed the hardware: instead of the AI Camera I use the Raspberry Pi High Quality Camera with an interchangeable lens. The computing is done on a Google Coral. I adapted the case accordingly.
The idea
- A camera watches the Hivora Sense from the outside all the time.
- An AI model checks the image for hornets about once per second.
- If it detects an Asian hornet, a video starts: 5 minutes in Full HD. On top of that come 5 seconds of pre-roll, so the approach is on it too.
- With every video, the image that triggered it and a list of all detections are saved.
That way, only videos in which something actually happens are created. I don’t have to sift through hours of footage of an empty Hivora Sense.
The hardware
| Part | Purpose |
|---|---|
| Raspberry Pi 4 or 5 | the small computer that controls everything |
| Raspberry Pi HQ Camera with interchangeable lens (or Camera Module 3) | the image, with a focal length that suits the distance to the Hivora Sense |
| Google Coral USB Accelerator | an add-on chip that runs the AI model quickly |
| weatherproof 3D-printed case | protection from rain and sun |
| Power supply (mains adapter or solar + battery) | for continuous operation outdoors |
The Coral has a little back story, by the way. I bought it a few years ago. Since then it had been sitting in a drawer because I lacked the right project. Now I can finally put it to good use.


The case
The starting point was the “Mini AI Camera Solar” case from Printables. I adapted it for my parts:
- 10 mm wider, so the Pi, the Coral and the angled USB cable fit side by side.
- A new mounting plate. The Pi sits on it, with the Coral above it on a small bridge.
- A dedicated lid for the HQ Camera. The lens screws in from the outside and can be changed without opening the case. A hood above it keeps the rain off.
- TPU seals: a grommet for the USB power cable, a plug for the unused cable hole and a sealing washer on the lens.
- A mount for a thin pole (Ø 15.6 mm), so the camera stands next to the Hivora Sense at the right height.
All parts are generated from a script, so distances and dimensions are easy to change. Before printing, the script checks whether anything collides.

The detection
The AI model comes from the Hivora project and was trained on images from the Hivora Sense. It works with images at 960 pixels resolution. That is large enough to still recognise a hornet from a few metres away. Among other species, it knows the Asian hornet and the native European hornet (Vespa crabro).
Preparing the model for the Coral was the hardest part. The official compiler gave up on the complete model. The solution was to split the model into several pieces. Each piece runs on its own on the Coral, and at the end the Pi only computes a small remainder. That way almost 100 % of the computing work lands on the Coral.
Is the Coral worth it? I measured it on a Raspberry Pi 4:
| Time per image | |
|---|---|
| Pi only (4 cores) | approx. 2.5 s, the Pi runs at full load and gets warm |
| with Coral | approx. 0.9 s, the Pi stays almost idle |
So with the Coral the system checks about every second. Without it, it would only be every 2.5 seconds. A hornet flying past quickly would be missed more easily without the Coral.
So that a single false detection doesn’t trigger a video right away, the hornet has to be detected in 2 out of 3 consecutive checks.
The recording
The camera records continuously, but only writes to a buffer in memory that holds a few seconds. On a detection, the buffer becomes the start of the video. That is why the moment before the detection is visible too. Video and detection run independently of each other. The video runs at a smooth 25 frames per second, even though the model only checks once per second.
Each event produces three files:
hornisse-<zeit>.mp4: the videohornisse-<zeit>.jpg: the image that triggered the recordinghornisse-<zeit>.json: all detections during the recording with time, species and confidence
Live view in the browser
The Pi serves a small web page: the live image, the current status and a list of recordings to watch and download directly. That makes it easy to aim and focus the camera on site with a phone.

First results
There was a recording on the very first day: an Asian hornet was detected with 52–67 % confidence. Over the five minutes, 27 detections came together.
What I learned along the way
- Colours: At first, red and blue were swapped in the live image and in the detection. The bug was in the software, not the light or the camera. It also affected the detection, because the model received the wrong colours as well.
- Videos too fast: The first videos ran 20 % too fast because the wrong frame rate was set when converting to MP4. That is fixed, and the old videos have been repaired.
- Power: An older Pi 4 won’t boot with some USB-C cables. A simple cable without a chip helps.
- Only swap the camera with the power off, otherwise the camera module hangs until the next reboot.
- Keep running without the Coral: If the Coral fails, the camera keeps showing the live image and retries every 30 seconds instead of crashing.
What’s next?
- Collect more recordings and analyse the behaviour: how long does the hornet stay, how does it approach, how often does it come back?
- Combine the videos with the images the Hivora Sense takes from above
- Test operation with solar and battery
- Use the videos as additional training data for the model
Frequently asked questions
With a camera that detects by itself when a hornet is in the picture. An AI model checks the image about once per second. If the Asian hornet is detected in 2 out of 3 consecutive checks, a five-minute Full HD video with 5 seconds of pre-roll starts.
A Raspberry Pi 4 or 5, the Raspberry Pi HQ Camera with an interchangeable lens (or the Camera Module 3), a Google Coral USB Accelerator, a weatherproof 3D-printed case and a power supply via mains adapter or solar and battery.
Yes. On a Raspberry Pi 4, one detection takes about 2.5 seconds without the Coral and puts the Pi at full load; with the Coral it takes about 0.9 seconds and the Pi stays almost idle. So the system checks about every second and is less likely to miss hornets flying past quickly.
Yes. The model from the Hivora project knows, among others, the Asian hornet (Vespa velutina) and the native European hornet (Vespa crabro). At 960 pixels resolution it recognises hornets even from a few metres away.
The camera constantly writes to a buffer in memory that holds a few seconds. On a detection, this buffer becomes the start of the video, so the moment before the detection is visible too.
Three: the video as MP4, the triggering image as JPG and a JSON file with all detections during the recording, each with time, species and confidence.