This project focuses on building a computer vision model on a headless Raspberry Pi to detect Asian hornets (Vespa velutina) in the field. This approach allows for continuous data collection without requiring constant monitoring. Analyzing the images afterward provides flexibility in identifying hornets and reporting them on waarnemingen.nl (observations.org).
- The Raspberry Pi operates headless, functioning without a monitor or keyboard.
- It can be configured to capture an image at regular intervals (e.g., every 15 seconds) during active time.
- If a Asian hornet is detected, the image with a timestamp is be saved to a microSD card.
- Captured images are stored on a microSD card for later retrieval.
- Step-by-Step Instructions for Building a Hornet Detector
- Project Summary
- Goal of the Project
- Content Description
- Other Resources
- Dataset on Kaggle
- Training with YOLOv10 on Colab
- Background
- Datasets
- Model
- Validate the Model
- Demo
- To Do
- Acknowledgements
Aim: Detection system using a Raspberry Pi 4 to capture images of Asian hornets with high accuracy (target: 95% accuracy, with a maximum of 5% false positives where other insects are misidentified as Asian hornets). These images will be used for reporting on waarnemingen.nl.
- manuals:
- colab: code to make the model in Colab and the yaml file.
- content_data3000_ date: Results of the training with confusion matrix and best- and last weights file.
- codeLocalComp: Code on local computer to check images and test the model with a slideshow and with USB camera.
- codeRasberryPi4: Code to test the installation Torch and the CSI camera, test the model with a slideshow and use the model with the CSI camera.
- test: Images, slideshows and video's that can be used to test the model.
- Hornet3000 dataset (located in Kaggle)
- vespCV_YOLOv10n (located in Google Colab)
The Asian hornet (Vespa velutina) is an invasive alien species that has been found mainly in the southern part of the Netherlands for several years. The hornet is harmful to honeybees, bumblebees, and other pollinating insects.
More information about the exotic invasive Asian hornet in the Netherlands can be found on:
Images for the training and validation were collected mainly from waarnemingen.nl (observation.org) with the settings alleen goedgekeurd
and alle deelbare licenties
.
The dataset is stored on Kaggel.
Images for testing also include other insects and are stored in the folder test
The model was trained with yolov10 in google colab. YOLO is a fast and accurate object detector. It was chosen for this project due to its speed and simplicity, making it suitable for real-time hornet detection. Inspired by https://github.com/computervisioneng/train-yolov10-custom-data-full-guide.
Make a slideshow of test images (or download from the dataSlider folder hornet3000.m4v).
Install yolov10, click here for instruction
Use the test_slider.py on your local computer, click here for more information
A bounding box, class and conficence is show. This can be used to finetune the confidence levels.
The camera is taking images from the right side of the screen (showing hornets from waarnemingen.nl). On the left side the captured image of the camera and the inference. When a class 0 (Asian hornet) is detected the picture is saved under the name and timestamp in the folder imaged (bottom left).
- Optimize confidence threshold in the wild
- Add insects to the model if needed (false positive hornet detections by other species)
- Optional: connection with smartphone
- Optional: simplify installation process
Yolov10 training of the model is based on https://github.com/computervisioneng/train-yolov10-custom-data-full-guide