Skip to content

therajsekharsaha/pestdetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Plant Pest Detection Using YOLOv8 Nano 🦟

Note
This is the second iteration of the model.

Installation πŸ”§

To set up and run the model, follow these steps:

  1. Clone this repository:
    git clone https://github.com/therajsekharsaha/pestdetection.git
    cd pestdetection
    pip install -r requirements.txt
    python manage.py
    

Overview

This model was developed as part of our thesis project, "GroPro: Grow and Protect", focused on detecting and mitigating plant pests in urban gardens using both object and audio detection technologies. It enables real-time pest detection in images, videos, and other media formats.

Model Architecture πŸ€–

The model uses the YOLOv8 Nano architecture, a compact and efficient variant of the YOLOv8 object detection model, optimized for edge devices like the Raspberry Pi 4. The model was trained on a custom dataset of plant pest images, collected via web scraping from various online sources. YOLOv8 Nano is designed for real-time, low-power pest detection in urban gardens.

Performance Metrics βš™οΈ

The model's performance was evaluated based on mean Average Precision (mAP) across various Intersection over Union (IoU) thresholds, ranging from 0.5 to 0.95 (with a step size of 0.05). The overall mAP achieved was 0.195 on the validation set. Here's a breakdown of mAP for each pest class:

  • Aphid: 0.0899
  • Fruit Fly: 0.292
  • Scale Insect: 0.202

Speed:

  • Preprocessing: 0.3 ms per image
  • Inference: 33.7 ms per image
  • Postprocessing: 4.3 ms per image

While the model shows promising results, there is still room for improvement, especially in detecting aphids, which currently have lower accuracy.

Demo 🦟

Below is a demonstration of the model’s performance on a test video. The model successfully detects and labels various plant pests in real-time:

Pest Detection Demo

About

it is a 🌿 real-time pest detection system for urban gardens. It uses the lightweight πŸ€– YOLOv8 Nano model to identify pests like 🐜 aphids and 🦟 fruit flies, optimized for edge devices like the πŸƒ Raspberry Pi 4.

Topics

Resources

Stars

Watchers

Forks

Contributors