BeeMonitor: Automated IoT video surveillance and an AI-powered video processing system for monitoring the foraging and nesting behavior of cavity-nesting solitary bees
BeeMonitor: Automated IoT video surveillance and an AI-powered video processing system for monitoring the foraging and nesting behavior of cavity-nesting solitary bees
Amoah, E. I.; Sanjel, S.; Boyle, N.; Grozinger, C.
AbstractSolitary bee species that use artificial trap nests are important for agricultural crop production and as indicators of habitat quality. Quantifying cavity-nesting solitary bee foraging and nesting behavior is essential for real-time analysis of population numbers and pollination activity, as well as understanding how environmental conditions shape reproductive success and population dynamics. However, manual observation is labor-intensive, prone to observer bias, and unable to deliver continuous data. Existing automated systems either require individual bee marking or detect presence without resolving nest-tube-level entry and exit events. We developed BeeMonitor, an integrated hardware and computer-vision pipeline that detects nest entry and exit events in cavity-nesting solitary bees from continuous video, using Osmia cornifrons (the horn-faced mason bee) as a model system. A low-cost Raspberry Pi handles solar-powered field recording, while the software combines object detection (YOLOv26), a custom multiple-object tracker (BeeTrack), and a Random Forest classifier trained on trajectory-derived features to distinguish genuine events from incidental detections. Over a 29-day deployment, hardware reliability averaged 97.5% recording coverage. The pipeline achieved 91.3% precision and 87.3% recall (F1 = 0.893), generalizing robustly under leave-one-video-out cross-validation (mean F1 = 0.904). Detected foraging trips correlated strongly with brood cell counts (R2 = 0.849, p < 0.001, n = 19), and a Random Forest model (AUC = 0.820) identified solar radiation as the dominant driver of foraging activity, followed by temperature. BeeMonitor demonstrates that automated computer vision can reliably extract ecologically relevant behavioral data from continuous video, enabling real-time analysis of pollinator behavior and abundance at a temporal and spatial resolution unattainable through manual observation. Its modular design supports adaptation to other species and monitoring contexts.