🌱 AgriVision AI β€” From Detection to Real-World Decisions

πŸš€ Inspiration

This project started from a simple question:

Why do AI models perform well in metrics, but struggle in real-world agricultural environments?

While exploring weed detection in crop fields, I realized that many existing approaches focus heavily on model accuracy, but overlook how these models behave under real conditions β€” especially when decisions directly affect physical outcomes such as crop damage.

This curiosity led me to build a system that not only detects weeds, but also evaluates how usable those detections are in practice.


🧩 Problem

During development, I discovered a key limitation:

The training dataset (from Kaggle) used large bounding boxes covering entire weed regions, rather than individual plants.

As a result, the model learned to detect aggregated weed areas instead of discrete plant instances.

This created several real-world issues:

  • Over-detection in dense areas
  • Large, imprecise bounding boxes
  • Difficulty distinguishing crop vs weed
  • Inflated weed counts

πŸ› οΈ Solution

Instead of treating this as a model-only problem, I approached it as a system-level challenge.

I introduced an OpenCV-based post-processing layer that:

  • Filters unrealistic bounding boxes
  • Applies Non-Max Suppression (NMS)
  • Removes noise and extreme detections
  • Refines detection outputs into more meaningful plant-level approximations

This significantly improved the practical usability of the model.


βš™οΈ How It Works

The system pipeline:

  1. Image input (field image or video frame)
  2. TFLite-based object detection model
  3. Output parsing and normalization
  4. Post-processing layer (filtering + NMS + heuristics)
  5. Visualization (bounding boxes, metrics, density)
  6. Decision support outputs (weed count, density, insights)

πŸ“Š Key Features

  • 🌿 Weed detection with real-time visualization
  • πŸŽ₯ Video frame analysis
  • πŸ“ˆ Weed density estimation
  • 🧠 Post-processing for real-world reliability
  • πŸ“ Insight layer for decision support

⚑ What Makes It Different

Most projects stop at β€œmodel prediction”.

This project focuses on:

Bridging the gap between model output and real-world usability

Instead of optimizing only for accuracy, it addresses:

  • dataset limitations
  • model behavior in field conditions
  • practical interpretation of predictions

πŸ“š What I Learned

  • Dataset quality directly shapes model behavior
  • High mAP β‰  usable system
  • Post-processing is critical in real-world AI
  • Understanding why a model behaves a certain way is more important than just improving metrics

πŸ”₯ Challenges

  • Handling noisy detections and overlapping boxes
  • Dealing with dataset-level limitations
  • Preventing over-detection in dense scenes
  • Balancing precision vs usability

πŸš€ Future Work

  • Retrain model using datasets with per-plant annotations (e.g., DeepWeeds, CottonWeed)
  • Improve crop vs weed classification
  • Add GPS-based field mapping
  • Integrate decision-making systems for precision agriculture
  • Extend to real-time deployment on edge devices

πŸ’‘ Final Thought

This project is not just about detecting weeds.

It is about designing AI systems that work reliably in the real world, where every prediction can lead to a physical action.

And that’s where true impact happens.

Built With

Share this project:

Updates

Submission history