Skip to content

MathPent/rakshak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌾 Fasal Rakshak – Dr. Crop

AI-powered Wheat Disease Detection & Smart Crop Doctor

“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.


🚀 Version 1.0.0 — SIH Demo Build

🔥 Core Features (Demo Build)

1️⃣ AI Crop Disease Detection System

  • 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)

2️⃣ Mobile App (Farmer App)

  • Farmers upload image → get instant diagnosis
  • Clean UI + simple workflow
  • Works with FastAPI backend

3️⃣ Dr. Crop (Chatbot + Advisor)

  • A smart GPT-powered agricultural assistant
  • Provides:
    • Solutions
    • Pesticide guidance
    • Seasonal advice
    • Early warnings (future)

4️⃣ Backend + Cloud + Data Storage

  • FastAPI backend
  • ML inference engine
  • Stores:
    • Images
    • Metadata
    • Predictions
    • GPS info (future)

5️⃣ Drone / Satellite Pipeline (Future-ready)

Our architecture already supports:

  • Drone images
  • Satellite crop-health datasets
  • Multi-modal input
  • Early disease outbreak mapping

6️⃣ Research Dataset Builder

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

🧠 AI Model

✔ Base Model

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.txt

3️⃣  Start API

cd backend
uvicorn app:app --reload --host 0.0.0.0 --port 8000

4️⃣ Test in browser

Open:

👉 http://localhost:8000/docs

Upload image → get prediction → solutions → video links.


🌐 Endpoints

POST /predict-image

Input: image file Output:

{
  "label": "brown_rust",
  "confidence": 0.92,
  "solution": "...",
  "tutorials": ["youtube.com/..."]
}

📦 Tech Stack

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


🧭 Future (Production Roadmap)

🔥 Phase 2

  • AI-powered Dr. Crop Chatbot
  • Multi-class crop disease expansion
  • Offline mode using TensorFlow Lite

🔥 Phase 3

  • Drone image ingestion
  • Satellite NDVI-based early detection
  • Heatmap dashboard for Govt/Researchers

🔥 Phase 4

  • Marketplace (E-Cart)
  • Farmer community
  • Field health history & smart recommendations

🥇

Why Fasal Rakshak Wins

✔ Real problem solved

✔ Early disease detection saves yield

✔ Govt, farmers, researchers — all benefit

✔ Future-ready architecture

✔ Offline support + scalability

✔ Research + data pipeline vision

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors