This repository contains the implementation and evaluation of deep learning models for real-time pest detection in potato crops, specifically optimized for edge inference on the AgriScout robot. The project compares various YOLO architectures to find the optimal balance between accuracy and latency for field deployment.
- Trained Model Weights: Download from Google Drive
- Subset Dataset: Download from Google Drive
-
Clone the repository:
git clone https://github.com/yourusername/AgriScout-Beetle-Detection.git cd AgriScout-Beetle-Detection -
Install dependencies:
pip install -r requirements.txt
To start the training process for the various YOLO models (v5s, v8s, v9s, v10s, v11s, v12s), use the provided training script. This script is configured with optimized hyperparameters and augmentation settings for agricultural datasets.
python Scripts/Train.py- Configuration: Edit Scripts/Train.py to modify
MODELS_TO_TEST,epochs, orimgsz. - Output: Results are saved in runs/train_comparison/.
To evaluate the trained models on the test set and generate comprehensive performance metrics (mAP50, mAP50-95, Precision, Recall), run:
python Scripts/Eval.pyThis script performs multiple evaluation runs with different seeds to ensure statistical robustness.
For deployment on the NVIDIA Jetson Orin Nano Super (JetPack 6), we utilize the official Ultralytics Docker environment to ensure optimized TensorRT performance.
# Define the image tag
t=ultralytics/ultralytics:latest-jetson-jetpack6
# Pull and run the container with NVIDIA runtime
sudo docker pull $t && sudo docker run -it --ipc=host --runtime=nvidia $tOnce inside the container, execute the inference script to measure latency and throughput:
python Scripts/Inference.pyThe AgriScout platform generates detailed spatial maps of beetle infestation across potato fields, enabling targeted pest management strategies.
This work is part of the research on automated pest management using the AgriScout robotic platform.



