India's First AI + GIS Smart Farming Intelligence Platform
Complete seed-to-market intelligence with multi-class disease detection, digital twin mapping, yield prediction, IoT monitoring, and rural-accessible technology
AgriSphere AI is India's first comprehensive AI + GIS Smart Farming Intelligence Platform that combines cutting-edge machine learning, satellite imagery, and IoT sensors to revolutionize agriculture. From seed selection to market pricing, we provide complete farm management solutions designed specifically for Indian farmers.
- ๐ค Multi-Class Disease Detection: AI analyzes leaf, stem, fruit & soil images with 95% accuracy
- ๐พ GIS Smart Farm Digital Twin: Complete digital twin with field boundaries, soil zones, and irrigation mapping
- ๐ AI Yield Prediction Engine: Predicts crop yields using weather, soil, and historical data
- ๐ก IoT Soil Monitoring: Real-time monitoring with Firebase integration and smart irrigation
- ๐ฆ๏ธ Weather Risk Engine: AI-powered flood, drought, and heatwave alerts via SMS/WhatsApp
- ๐ค Voice Assistant (Hindi): Natural language commands in Hindi and regional languages
- ๐ Farmer-Buyer Marketplace: Direct selling platform eliminating middlemen
- โ๏ธ Blockchain Traceability: Supply chain tracking for premium quality assurance
Add screenshots of your dashboard here - main interface, disease detection, digital twin, yield prediction
๐ผ๏ธ Main Dashboard Interface 
๐ผ๏ธ Disease Detection Results

๐ผ๏ธ Yield Prediction Analytics
๐ผ๏ธ Voice Assistant Interface 
- React 18.3+: Modern React with hooks and concurrent features
- TypeScript 5.8+: Type-safe development
- Vite: Lightning-fast build tool and dev server
- Tailwind CSS: Utility-first CSS framework
- shadcn/ui: Beautiful, accessible component library
- Framer Motion: Smooth animations and transitions
- React Router: Client-side routing
- Recharts: Interactive data visualizations
- TensorFlow.js 4.22+: Client-side machine learning
- OpenAI API: Advanced AI capabilities
- Custom ML Models: Plant disease detection, yield prediction
- Python ML Pipeline: Scikit-learn, XGBoost, LSTM networks
- Firebase: Authentication, Firestore, and hosting
- Flask/FastAPI: Python API server for ML inference
- Mapbox: GIS mapping and digital twin
- IoT Integration: Real-time sensor data processing
- ESLint: Code linting and formatting
- PostCSS: CSS processing
- Vite Plugins: Optimized development experience
| Crop | Season | Disease Classes | Accuracy |
|---|---|---|---|
| ๐พ Rice | Kharif | 15+ diseases | 96% |
| ๐พ Wheat | Rabi | 12+ diseases | 95% |
| ๐ฝ Maize | Kharif/Rabi | 10+ diseases | 94% |
| ๐ฅ Potato | Rabi | 8+ diseases | 97% |
| ๐ Tomato | All seasons | 20+ diseases | 95% |
- Leaf Diseases: Blight, Spot, Rust, Mold
- Stem Diseases: Rot, Canker, Wilt
- Fruit Diseases: Rot, Spot, Blight
- Soil Issues: Nutrient deficiency, pH imbalance
- Pest Damage: Insect bites, fungal infections
- Node.js 18+ and npm
- Python 3.8+ (for ML training)
- Git
- Firebase account (for authentication)
- Install dependencies
npm install
2.. Install Firebase
npm install firebase-
Create .env file Create a
.envfile in the root directory with the following content:VITE_OPENAI_API_KEY=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 VITE_MAPBOX_ACCESS_TOKEN=pk.eyJ1IjoibXVza2FuMTIxNiIsImEiOiJjbTkzNDFoM2owYnUyMndzNDI1OG4yY3k4In0.4j6e_uHRIj9rwP8W7R658Q VITE_WEATHER_API_KEY=796cdb2a0021887a20495ba82c2b2cc5 -
Start the development server
npm run dev
-
Access the application
Frontend: http://localhost:8080 Backend API or Python : http://localhost:5000
requirements_api.txt
requirements_training.txt
requirements_yield.txt
simple_requirements.txtStart the python development server
python api_server.py- Upload Crop Images
- Take photos of leaves, stems, fruits, or soil
- Support for JPG, PNG formats
- Real-time analysis with confidence scores
You can test the AI model using images from the sample_test/ folder included in this repository.
๐ค Upload Crop Images
Take photos of leaves, stems, fruits, or soil
Or use the sample images from:
/sample_test/Supports JPG and PNG formats
Real-time analysis with confidence scores
- AI Analysis Results
- Disease identification with 95% accuracy
- Treatment recommendations
- Prevention strategies
- Cost estimates for treatments
-
Field Boundary Drawing
- Interactive map interface
- GPS coordinate capture
- Multi-polygon support
-
Soil Zone Analysis
- Satellite imagery integration
- Soil type classification
- Irrigation zone mapping
-
Input Parameters
- Weather data (temperature, rainfall, humidity)
- Soil characteristics (pH, nutrients, texture)
- Historical yield data
- Crop variety and planting date
-
AI Prediction Results
- Yield estimates with confidence intervals
- Risk assessment
- Optimization recommendations
- Architecture: EfficientNetB0 + Custom Classification Head
- Training Data: PlantVillage Dataset (50,000+ images)
- Accuracy: 95%+ validation accuracy
- Classes: 15+ disease categories
- Inference: <100ms per image
- Algorithms: Random Forest, XGBoost, LSTM
- Features: Weather, soil, historical data (40+ features)
- Accuracy: 92-96% depending on crop
- Time Series: 7-day weather forecasting
# Disease Detection Training
1. Dataset preprocessing and augmentation
2. EfficientNetB0 base model fine-tuning
3. Custom classification head training
4. Model evaluation and export
# Yield Prediction Training
1. Feature engineering (40+ features)
2. Multi-model ensemble training
3. Cross-validation and hyperparameter tuning
4. Model serialization for productionAgrisphere/
โโโ ๐ src/
โ โโโ ๐ components/ # Reusable UI components
โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ Login.tsx # Authentication components
โ โ โโโ Signup.tsx
โ โ โโโ AIChat.tsx # AI assistant
โ โโโ ๐ pages/ # Main application pages
โ โ โโโ Index.tsx # Landing page
โ โ โโโ DiseaseDetection.tsx
โ โ โโโ DigitalTwin.tsx
โ โ โโโ YieldPrediction.tsx
โ โ โโโ IoTMonitoring.tsx
โ โ โโโ Marketplace.tsx
โ โ โโโ VoiceAssistant.tsx
โ โ โโโ ComprehensiveDashboard.tsx
โ โโโ ๐ store/ # State management
โ โ โโโ authStore.ts # Authentication store
โ โโโ ๐ lib/ # Utilities and configurations
โ โ โโโ firebase.ts # Firebase config
โ โ โโโ utils.ts # Helper functions
โ โโโ App.tsx # Main app component
โโโ ๐ public/ # Static assets
โโโ ๐ models/ # Trained ML models
โโโ ๐ data/ # Training datasets
โโโ ๐ api_server.py # Flask API for ML inference
โโโ ๐ train_*.py # Model training scripts
โโโ ๐ requirements*.txt # Python dependencies
โโโ ๐ package.json # Node.js dependencies
โโโ ๐ README.md # Project documentation
- Environment Variables
VITE_FIREBASE_API_KEY=AIzaSyBJkpgg7K6yTyii-hBR2tCR0AX21bTQNgw
VITE_FIREBASE_AUTH_DOMAIN=agrispace-ea219.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=agrispace-ea219
VITE_FIREBASE_STORAGE_BUCKET=agrispace-ea219.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=528915442362
VITE_FIREBASE_APP_ID=1:528915442362:web:1c00c4257780e04aea3083
VITE_FIREBASE_MEASUREMENT_ID=G-WWZSNCRDH0
# Build and deploy to Firebase
npm run build
firebase deploy --only hostingPOST /api/disease-detection
Content-Type: application/json
{
"image": "base64_encoded_image",
"crop_type": "rice",
"location": "patiala_punjab"
}
Response:
{
"disease": "Leaf Blight",
"confidence": 0.96,
"treatment": "Apply copper fungicide",
"prevention": "Improve air circulation",
"cost_estimate": "โน500-800 per acre"
}POST /api/yield-prediction
Content-Type: application/json
{
"crop": "rice",
"area": 2.5,
"soil_ph": 6.8,
"rainfall": 1200,
"temperature": 28.5,
"historical_yield": 4500
}
Response:
{
"predicted_yield": 4800,
"confidence_interval": [4200, 5400],
"risk_level": "Low",
"recommendations": ["Increase potassium fertilizer", "Install drip irrigation"]
}- Disease Detection: 95.2% overall accuracy
- Yield Prediction: 93.8% accuracy
- IoT Monitoring: 99.1% uptime
- Voice Recognition: 89.5% Hindi accuracy
- Frontend Load Time: <2 seconds
- API Response Time: <500ms
- Image Processing: <3 seconds
- Concurrent Users: 1000+
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create feature branch
git checkout -b feature/amazing-feature
- Install dependencies
npm install pip install -r requirements_training.txt
- Make your changes
- Test thoroughly
- Submit pull request
Please use the GitHub Issues page to report bugs.
Include:
- Detailed description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- System information (OS, browser, etc.)
Have ideas for new features? Open an issue on GitHub with:
- Clear feature description
- Use case and benefits
- Implementation suggestions (optional)
This project is licensed under the MIT License - see the LICENSE file for details.
- Muskan - Lead Developer & ML Engineer
- Contributors - Welcome to join our mission!
- PlantVillage Dataset for disease detection training data
- OpenAI for advanced AI capabilities
- Mapbox for GIS mapping services
- TensorFlow.js for client-side ML
- All contributors and supporters of this project
For support, feature requests, or collaboration inquiries:
- Email: contact@agrisphere.ai
- Twitter: @AgriSphereAI
- LinkedIn: AgriSphere AI
Made with โค๏ธ for Indian Farmers
