“A digital crop doctor that sees what farmers can’t yet see.”
Fasal Rakshak is an end-to-end AI system for detecting wheat diseases, advising farmers, predicting outbreaks, and storing farmland data for research & future resilience.
🔥 Core Features (Demo Build)
- Upload leaf image → detects:
- Healthy / Unhealthy
- Which disease (Rust / Septoria / Smut / etc.)
- Confidence score
- Shows disease description
- Recommends immediate farmer actions
- Shows tutorial videos (from our knowledgebase)
- Farmers upload image → get instant diagnosis
- Clean UI + simple workflow
- Works with FastAPI backend
- A smart GPT-powered agricultural assistant
- Provides:
- Solutions
- Pesticide guidance
- Seasonal advice
- Early warnings (future)
- FastAPI backend
- ML inference engine
- Stores:
- Images
- Metadata
- Predictions
- GPS info (future)
Our architecture already supports:
- Drone images
- Satellite crop-health datasets
- Multi-modal input
- Early disease outbreak mapping
We store images (with farmer permission) so that:
- Researchers can study disease patterns
- Govt can track outbreaks
- Models improve every month
- Crop resilience improves over time
EfficientNetB0 (fine-tuned)
- Input: 224×224 leaf images
- Output: 5 classes
- Accuracy: ~94% (demo dataset)
efficientnet_final.keras
class_names.json🗂 Project Structure
rakshak/
│
├── backend/ # Python ML microservice
│ ├── core/
│ ├── data/
│ ├── knowledgebase/
│ ├── model/
│ ├── storage/
│ ├── app.py
│ ├── predict.py
│ ├── server_config.py
│ ├── requirements.txt
│ └── README.md
│
├── server/ # Node backend (auth/community/products/heatmap)
│ ├── config/
│ ├── controllers/
│ ├── data/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── templates/
│ │ └── otpEmail.html
│ ├── test/
│ │ └── heatmap.test.js
│ ├── tools/
│ │ ├── fetchUser.js
│ │ ├── sendEtherealTest.js
│ │ └── setOtp.js
│ ├── utils/
│ │ └── sendEmail.js
│ ├── uploads/
│ ├── .env.example
│ ├── Dockerfile
│ ├── index.js
│ ├── package.json
│ ├── package-lock.json
│ └── README.md
│
├── frontend/ # React + Vite
│ ├── public/
│ │ ├── agricart/
│ │ ├── Schemes/
│ │ ├── hero.png
│ │ └── hero.svg
│ ├── src/
│ │ ├── api/
│ │ │ ├── apiClient.js
│ │ │ ├── endpoints.js
│ │ │ └── mockServer.js
│ │ ├── app/
│ │ │ ├── AuthProvider.jsx
│ │ │ └── store.js
│ │ ├── assets/
│ │ │ ├── hero.png
│ │ │ └── roundlogo.png
│ │ ├── components/
│ │ │ ├── heatmap/
│ │ │ │ ├── __tests__/
│ │ │ │ │ └── LiveLocationMarker.test.jsx
│ │ │ │ ├── diseaseConstants.js
│ │ │ │ ├── DiseaseControls.jsx
│ │ │ │ ├── DiseaseLegend.jsx
│ │ │ │ ├── DiseasePanel.jsx
│ │ │ │ ├── HeatLayerFixed.jsx
│ │ │ │ ├── LiveBadge.jsx
│ │ │ │ └── LiveLocationMarker.jsx
│ │ │ ├── AgricartSection.jsx
│ │ │ ├── Button.jsx
│ │ │ ├── Card.jsx
│ │ │ ├── Footer.jsx
│ │ │ ├── heatmap.css
│ │ │ ├── HeatMap.jsx
│ │ │ ├── HeroAnimation.jsx
│ │ │ ├── HeroSection.jsx
│ │ │ ├── LanguageSelector.jsx
│ │ │ ├── Layout.jsx
│ │ │ ├── Navbar.jsx
│ │ │ ├── PageHeader.jsx
│ │ │ ├── ProtectedRoute.jsx
│ │ │ ├── SectionContainer.jsx
│ │ │ └── SignupSection.jsx
│ │ ├── data/
│ │ │ ├── agricart.js
│ │ │ └── schemes.js
│ │ ├── features/
│ │ │ └── scan/
│ │ │ ├── ScanPage.jsx
│ │ │ └── ScanResultCard.jsx
│ │ ├── hooks/
│ │ │ ├── useNetworkStatus.js
│ │ │ └── useOfflineQueue.js
│ │ ├── locales/
│ │ │ ├── en/translation.json
│ │ │ └── hi/translation.json
│ │ ├── pages/
│ │ │ ├── Community.jsx
│ │ │ ├── Dashboard.jsx
│ │ │ ├── DiseaseMapPage.jsx
│ │ │ ├── Home.jsx
│ │ │ ├── Login.jsx
│ │ │ ├── Products.jsx
│ │ │ ├── Schemes.jsx
│ │ │ ├── Signup.jsx
│ │ │ └── VerifyOtp.jsx
│ │ ├── styles/
│ │ │ ├── index.css
│ │ │ ├── theme.css
│ │ │ ├── tokens.css
│ │ │ └── utils.css
│ │ ├── utils/
│ │ │ ├── cloudinary.js
│ │ │ ├── App.css
│ │ │ ├── App.jsx
│ │ │ ├── i18n.js
│ │ │ ├── main.jsx
│ │ │ └── service-worker.js
│ ├── tailwind.config.js
│ ├── vite.config.js
│ ├── package.json
│ └── README.md
│
├── ml/
│ ├── generate_sample_dataset.py
│ └── requirements.txt
│
├── scripts/
├── docs/
├── .gitignore
├── README.md
└── package.json
**2️⃣ Install dependencies**
```bash
pip install -r backend/requirements.txt3️⃣ Start API
cd backend
uvicorn app:app --reload --host 0.0.0.0 --port 80004️⃣ Test in browser
Open:
Upload image → get prediction → solutions → video links.
POST /predict-image
Input: image file Output:
{
"label": "brown_rust",
"confidence": 0.92,
"solution": "...",
"tutorials": ["youtube.com/..."]
}Component Technology
AI Model EfficientNetB0 (TensorFlow/Keras) Backend API FastAPI Storage Local (future: MongoDB / S3) Chatbot Generative AI (Gemini/ChatGPT) Frontend React Native / Web Deployment Render / Railway / GCP
- AI-powered Dr. Crop Chatbot
- Multi-class crop disease expansion
- Offline mode using TensorFlow Lite
- Drone image ingestion
- Satellite NDVI-based early detection
- Heatmap dashboard for Govt/Researchers
- Marketplace (E-Cart)
- Farmer community
- Field health history & smart recommendations
✔ Real problem solved
✔ Early disease detection saves yield
✔ Govt, farmers, researchers — all benefit
✔ Future-ready architecture
✔ Offline support + scalability
✔ Research + data pipeline vision