PlantXAI is a full-stack AI platform designed to bridge the gap between complex machine learning and agricultural action. It uses Explainable AI (XAI)—specifically LIME and SHAP—to provide transparent, trustworthy plant disease diagnoses.
The platform consists of a high-performance FastAPI backend running a deep learning model (EfficientNetB3) and a React frontend that provides a premium, phase-based user experience.
- Multi-Scan: Upload one or many leaf images for instant disease classification.
- Verify: Overview of all plants in the batch with their health status.
- Explain: Deep-dive into specific plants using LIME/SHAP to see why the AI made the diagnosis.
- Recover: Receive AI-generated treatment plans and find relevant government schemes.
- Frontend: React, Tailwind CSS, Framer Motion, Lucide, Recharts.
- Backend: Python, FastAPI, TensorFlow, SHAP, LIME (tf-keras-vis), SerpApi, Groq.
- Model: EfficientNetB3 trained on the PlantVillage dataset (39 classes).
PlantXAI/
├── backend/ # FastAPI server & ML Pipeline (Python)
├── frontend/ # React Application (Vite/Node.js)
├── datasets/ # (Optional) Dataset for training
└── README.md # Root overviewcd backend
pip install -r requirements.txt
# Add your API keys to .env
python app.pycd frontend
npm install
npm run devThe system requires the following keys in backend/.env for full functionality:
SERP_API_KEY: For Google Search integration (Government Schemes).GROQ_API_KEY: For LLM-based diagnostic insights (Mixtral-8x7b).
PlantXAI doesn't just give you a name; it shows you the evidence.
- LIME (Local Interpretable Model-agnostic Explanations): Generates heatmaps highlighting the specific regions of a leaf (spots, discoloration) that match the disease patterns.
- SHAP (SHapley Additive exPlanations): Provides pixel-level attribution to show which features supported or contradicted the final diagnosis.
Built for the future of precision agriculture.