This repository contains a complete IoT-based system for real-time monitoring, detection, and logging of pollinator species. It is designed for edge devices to efficiently process video and sensor data using a YOLO-based detection pipeline while maintaining low power consumption for long-term field deployment.
The repository is organized in a modular structure, with dedicated components for:
- Sensor provisioning
- Data acquisition
- Video/frame processing
- Cloud integration and data upload
- Model management and configuration
In addition, this repository provides a minimal reproducibility package—including essential code, configuration parameters, and sample data—so that developers and researchers can understand the workflow and adapt or build their own embedded-system–based solutions on microcontrollers, Single Board Computers (SBCs), or custom processors.
A Single Board Computer (SBC) is a compact, fully functional computer built onto a single circuit board, typically used in embedded, IoT, and edge-AI applications. An SBC integrates:
- Processor (CPU)
- Memory (RAM)
- Onboard storage or support for SD/eMMC
- I/O interfaces such as USB, HDMI, GPIO, CSI/DSI camera ports, and networking options
SBCs are capable of running full operating systems such as Linux, making them ideal for deploying real-time inference, sensor fusion, and edge-level processing applications.
- Raspberry Pi
- NVIDIA Jetson Nano / Xavier NX
- i.MX8 multicore processor (Aplias iMX8) – the system and code in this repository were tested on this platform
SBCs provide a powerful yet energy-efficient platform for IoT edge deployments, enabling real-time processing without relying on cloud-based computation.
| Folder | Description |
|---|---|
Annonated_data_for_training |
Contains labeled and annotated datasets used for training insect/pollinator detection models. |
Camera_configurations |
Stores camera settings and configuration files for different deployment environments. |
Camera_testing |
Scripts and tools for testing camera setup, resolution, FPS, and detection pipelines. |
Cloud_upload |
Modules for uploading captured data and processed results to cloud storage or remote servers. |
Job_allocation |
Handles distributed task scheduling for cameras and sensors across multiple devices. |
Make_video_file |
Scripts to compile stored images into video files for review and analysis. |
Model_results |
Stores outputs from trained models including evaluation metrics, predictions, and logs. |
Models |
Trained YOLO models (best.pt) and related model weights for insect detection. |
On_Edge_TFLite |
Contains scripts and steps to integrate the NXP eIQ Machine Learning Layer into a Toradex-based Yocto build system for running TFLite-based inference on edge devices. |
Sensor_configuration |
Configuration files for connected camera sensor. |
Sensor_manager_console |
Web-based dashboard and control console for managing sensors and monitoring device status. |
Sensor_provision |
Scripts for provisioning new devices on AWS IoT, including boot scripts and certificate management. |
Synchronizer |
Handles time synchronization, periodic advertising, and data aggregation between edge devices. |
With_PFOO_MNIP_RPFT_architecture |
Implementation of insect detection pipeline using advanced algorithms (PFOO, MNIP, RPFT) for optimized detection. |
Without_PFOO_MNIP_RPFT_architecture |
YOLO-only version for direct full-frame detection without PFOO/MNIP/RPFT preprocessing. |
- Edge Processing: Optimized pipelines for low-power devices (ARM/Jetson boards).
- Real-Time Insect Detection: YOLO-based and advanced detection pipelines (PFOO, MNIP, RPFT).
- Data Logging: Per-second insect counts and per-minute CSV logs.
- Video Capture & Storage: GStreamer-based pipelines for high-resolution video capture.
- Cloud Integration: Automated upload of captured data and results to cloud servers.
- Sensor Monitoring: Real-time monitoring of environmental parameters like temperature, humidity, light, and GPS location.
- Device Provisioning: Secure AWS IoT provisioning with certificates and MQTT communication.
- Configure sensors and camera using the files in
Sensor_configurationandCamera_configurations. - Provision edge devices using scripts in
Sensor_provision. - Start the monitoring pipeline using the relevant scripts in
With_PFOO_MNIP_RPFT_architectureorWithout_PFOO_MNIP_RPFT_architecture. - Monitor sensors and video feeds via the
Sensor_manager_console. - Upload results to cloud using
Cloud_upload. - Review or generate videos using
Make_video_file. - Check model performance and outputs in
Model_results.
- Configuration files are mainly stored in
/etc/entomologist/ento.conf. - Each folder contains a detailed
README.mdwith folder-specific instructions.
- Python 3.x
- OpenCV, GStreamer
- YOLO (Ultralytics)
- AWS IoT SDK (awscrt, awsiot)
- paho-mqtt
- Numpy, Rectangle-Packer
This repository has been tested on the Aplias i.MX8 multicore processor. To ensure correct execution and reproducibility of results, the following system configurations are recommended:
- Processor: Aplias i.MX8 multicore processor
- Operating System: Customized Linux image deployed on the processor
- Dependencies: All required libraries and dependencies are included or documented in the respective module folders
Note: Execution of the complete pipeline requires a customized Linux image configured for the processor. The repository provides a minimal code framework to execute the process and reproduce results.
- Detailed execution steps for each module are provided separately within their respective folders in the form of
README.mdfiles. - Users should refer to these module-specific instructions to correctly set up, run, and test individual components of the system.
- The overall pipeline execution involves sequentially running the modules according to the instructions provided in the respective folders.
This repository serves as a minimal framework, enabling users to reproduce the results efficiently once the customized Linux image is deployed on the i.MX8 processor.
This work was supported by the IIT Ropar Technology and Innovation Foundation (iHub–AWaDH) for the Agriculture and Water Technology Development Hub, established by the Department of Science & Technology (DST), Government of India, at the Indian Institute of Technology Ropar under the National Mission on Interdisciplinary Cyber-Physical Systems (NM–ICPS).
The hub aims to develop sustainable solutions and improve agricultural productivity.
Karminder Singh
Department of Electrical Engineering
Indian Institute of Technology Ropar, Rupnagar 140001, India
Email: [email protected]
Milanpreet Kaur
Department of Electrical Engineering
Indian Institute of Technology Ropar, Rupnagar 140001, India
Email: [email protected]
Dr. Suman Kumar
Department of Electrical Engineering
Indian Institute of Technology Ropar, Rupnagar 140001, India
Email: [email protected]
This repository is released for academic and research use as part of a collaborative effort between the IIT Ropar Technology and Innovation Foundation (iHub–AWaDH) and the authors of this work. All codes and associated resources are provided solely for non-commercial research purposes.
Users are requested to cite this work appropriately if any component of the repository is used, adapted, or referenced in academic publications or derivative research.