FasalGuard
AI-Powered Crop Disease Detection
Client
Self-initiated
Year
2026
Role
AI Engineer · Full Stack
Stack
Python · YOLOv8 · ViT · FastAPI · React Native · Groq
Status
Deployed on HF Spaces
Context
Farmers need a field assistant, not a lab report.
Crop diseases cost farmers millions annually, but diagnosis often requires expert knowledge or sending samples to labs — slow and inaccessible for most. FasalGuard puts AI-powered diagnosis straight into a farmer’s pocket: point, snap, and get disease identification, severity assessment, and treatment recommendations in seconds.
The Vision
A pocket lab for every farmer.
Two-stage architecture designed for real-world field conditions. First, YOLOv8 localizes and crops the leaf from a noisy background. Then, a Vision Transformer (ViT) fine-tuned on 87,000+ images classifies 38 disease classes across 13 crop species at 93% accuracy. A Groq-powered LLM chatbot provides conversational follow-up on diagnosis and treatment.
The Product
Snap. Diagnose. Treat.
The mobile app (React Native) connects to a FastAPI backend deployed on Hugging Face Spaces. Users photograph a leaf, the two-stage pipeline processes it in real-time, and returns disease name, severity assessment, and actionable treatment recommendations. The integrated chatbot provides conversational follow-up for any questions.
Architecture
Under the hood.
Mobile Client
Cross-platform mobile app for field use with camera integration and real-time results.
API Layer
High-performance async API handling image upload, inference orchestration, and chatbot integration.
Stage 1 - Detection
Trained on public dataset to localize and crop leaf regions, isolating from background noise.
Stage 2 - Classification
Fine-tuned on public dataset for 38 disease classes across 13 crop species — 93% accuracy.
LLM Chatbot
Conversational follow-up on diagnosis, severity, and treatment using Groq-powered LLM.
Challenge
Single-stage classifiers failed in the field.
Traditional single-stage classifiers trained on lab images performed poorly on real-world farmer photos with cluttered backgrounds. Splitting the pipeline into detection (crops the leaf) then classification (on the clean crop) boosted accuracy by 14% and made the system viable for field use.
Performance
Performance
93%
Detection Accuracy
38
Disease Classes
13
Crop Species
2-stage
Pipeline Stages
<2s
Inference Latency
Dataset
Detection Dataset
6,000+ images
Classification Dataset
87,000+ images
Data Sources
PlantDoc + PlantVillage
Augmentation
Rotation, flip, crop
My Contribution
Model development (YOLOv8 detection pipeline, ViT classification fine-tuning), FastAPI backend, Groq chatbot integration, and deployment on Hugging Face Spaces.
Next case