💡 Inspiration 🌾🍌

Over 30% of global agricultural harvest yields are destroyed annually 🍂 by preventable foliar plant diseases like Black Sigatoka (Pseudocercospora fijiensis) in bananas 🍌 and Late Blight (Phytophthora infestans) in staple solanaceous crops 🍅🥔.

While smartphone cameras are common today 📱, most existing plant disease detection applications act as superficial, black-box classification wrappers 📦. They return a basic class label like "Late Blight" without providing critical clinical context:

  • ❓ How severe is the foliar surface damage? 📐
  • ❓ How much yield and financial investment is at risk? 💵
  • ❓ Exactly what chemical or organic dosage should be applied without over-treating and poisoning soil runoff? 🧪

For Banana Hacks 2026 🏆, we set out to build AgroScan AI 🌿—a clinical, multimodal diagnostic platform that turns visual pixels into quantifiable mathematical damage metrics, integrates real-time environmental context ⛅, and delivers actionable, multilingual field prescriptions! 🚜


🔬 What It Does & How We Built It 🛠️⚡

AgroScan AI uses a Dual-Branch Computer Vision Pipeline 🧠 paired with live microclimate heuristics:

1. 🌿 Botanical Foliage Validation

Before running diagnostics, an input validation filter analyzes the image in the HSV (Hue, Saturation, Value) color space to ensure botanical tissue is actually present ($>5\%$ leaf lamina ratio) 🍃, automatically rejecting accidental uploads of non-plant imagery (faces, vehicles, objects) 🚫.

2. 📐 Deterministic Lesion Quantification

Rather than relying on uninterpretable neural network activations to guess infection severity 🎲, AgroScan AI uses deterministic OpenCV HSV thresholding 🔬:

  • 🍃 Leaf Mask Extraction: Isolates the active foliar canopy using a calibrated hue window of \([18, 88]\).
  • 🍂 Lesion Isolation: Identifies necrotic and chlorotic tissue within the leaf boundaries using morphological ellipse filters.
  • 📊 Surface Damage Index: Computes the mathematical infection severity: $$\text{Severity Index (\%)} = \left( \frac{\text{Lesion Pixel Count}}{\text{Total Leaf Lamina Pixel Count}} \right) \times 100$$

3. ⛅ Real-Time Microclimate Sensor Integration

Pathogens like fungal spores accelerate drastically in humid microclimates 🌧️. AgroScan AI queries the Open-Meteo REST API 📡 to pull live ambient temperature and relative humidity. If ambient humidity exceeds $70\%$, the system issues an automated Microclimate Spore Warning ⚠️ and adjusts the recommended fungicide spray window.

4. 💵 Economic Loss & Yield Deficit Modeling

The platform directly translates visual severity percentages into financial exposure for growers 📈: $$\text{Projected Yield Loss} \approx (\text{Severity} \times 0.75) + 3.2\%$$ Providing farm supervisors with clear dollar-per-acre risk projections ($/acre) to justify treatment ROI 💼.

5. 📋 Multi-Pillar Clinical Prescription & Localized Accessibility

AgroScan AI synthesizes a structured 3-part action plan 💊:

  1. 🧪 Chemical Control Protocol: Exact dilution per liter and rainfastness intervals.
  2. 🌾 Cultural & Agronomic Sanitation: De-leafing infected fronds and halting overhead sprinkler irrigation.
  3. 🛡️ Preventative Action: Canopy airflow optimization and follow-up scouting windows.

To ensure access for smallholder growers in developing regions 🌍, the UI offers a full Urdu Right-to-Left (RTL) mode 🇵🇰 with browser-level Text-to-Speech (TTS) audio prescriptions 🔊 and instant PDF clinical summary generation 📄!


🚧 Challenges We Ran Into 🧗‍♀️⚙️

  1. ☀️ Environmental Invariance & Lighting Noise: Outdoor leaf photos often suffer from severe sun glare and harsh shadows. RGB thresholding was brittle, which led us to calibrate a dynamic HSV color-space pipeline with morphological closing operations to eliminate specular reflection voids 🪞.
  2. 🪤 Avoiding "Thin Wrapper" Traps: The hackathon guidelines explicitly state that trivial API wrappers score lower. We ensured deep engineering by combining classical deterministic vision (OpenCV) with microclimate heuristics and economic modeling 📊.
  3. 🌐 Strict RTL & Accessibility Design: Aligning cards, sliders, metric chips, and custom HTML speech synthesis scripts for seamless Urdu RTL support while preserving styling consistency required meticulous CSS overrides 🎨.

📚 What We Learned 💡🎓

  • 🤝 Hybrid Vision Power: Classical computer vision and deep learning are not mutually exclusive—combining deterministic pixel mathematics with vision feature backbones creates reproducible and transparent clinical outputs.
  • 🎯 Real-World Metrics Matter: Agricultural AI must connect directly to economic outcomes ($/acre) to drive real adoption on the ground.
  • ⚡ Inclusive Design: Designing for low-resource farming environments means prioritizing offline speed, native voice accessibility, and zero-latency inference.

🔮 What's Next for AgroScan AI 🚀🌱

  • 📱 Offline Edge Deployment: Quantizing the segmentation pipeline to run locally on low-power Raspberry Pi 5 / Coral Edge TPU setups for zero-connectivity fields.
  • 🛸 Autonomous Drone Fleet API: Emitting GeoJSON boundary tags and damage coordinates to automated crop-dusting drones for targeted micro-spraying.
  • 🛰️ Multispectral Aerial Imaging: Expanding beyond RGB into NIR (Near-Infrared) drone channels to detect foliar blight days before visible lesions surface on the leaf blade!

Built With

Share this project:

Updates

Submission history