๐ŸŒพ KrishiMarg โ€“ AI-Powered Crop Prediction & Smart Farming Assistant

๐Ÿš€ Inspiration

Small-scale farmers often rely on traditional knowledge and guesswork when selecting crops or managing soil, irrigation, and fertilizers. This leads to reduced yield, inefficient resource usage, and financial risk.
We wanted to build something practical, scalable, and farmer-friendlyโ€”a system that brings AI + IoT + real-time data right to the field.
Thatโ€™s how KrishiMarg was born.


๐ŸŒฑ What It Does

KrishiMarg is an AI-driven platform that predicts the most suitable crops for a farmerโ€™s field based on real-time IoT sensor data, weather insights, and soil health parameters.
It provides:

  • ๐Ÿ“ก Real-time soil & environment monitoring (N, P, K, pH, moisture, temperature, humidity, rainfall)
  • ๐Ÿค– ML-powered crop prediction using supervised ML models
  • โ˜๏ธ Weather API integration for region-specific climate forecasts
  • ๐Ÿงช Soil-health based recommendations for irrigation, fertilization, and pest control
  • ๐ŸŒ Multilingual interface enabling accessibility for farmers
  • ๐Ÿ“ฑ Web platform with simple visual insights

Our goal: Increase crop yield by at least 10% through data-driven decision-making.


๐Ÿ› ๏ธ How We Built It

Hardware & IoT Pipeline

  • Built IoT sensor nodes using ESP32
  • Measured parameters:
    • N, P, K
    • Soil pH
    • Soil Moisture
    • Temperature & Humidity
    • Rainfall
  • Data sent to Firebase Realtime Database
  • Weather data fetched via external weather APIs

Backend & ML Model

  • Backend developed using Node.js + Express.js
  • Real-time data preprocessing pipeline
  • Supervised ML model using Scikit-learn trained on agricultural datasets
  • Prediction API integrated with backend
  • MongoDB used for user/device logging

Frontend

  • Web app built with EJS templates, CSS, and vanilla JS
  • Multilingual support for regional languages
  • Clean and intuitive UX for farmers

๐Ÿงฉ Challenges We Ran Into

  • Collecting clean agricultural datasets
  • Normalizing multi-source sensor data
  • Ensuring high model accuracy across soil variations
  • Designing a low-latency IoT โ†’ Cloud โ†’ ML pipeline
  • Building an accessible UI for rural users
  • Syncing Firebase, ML server, and frontend in real time

๐Ÿ† Accomplishments Weโ€™re Proud Of

  • End-to-end working solution integrating IoT + AI + Web
  • Achieved 85โ€“90% accurate crop prediction
  • Low-latency real-time sensor streaming
  • Clean multilingual farmer-friendly interface
  • Scalable architecture ready for pilot deployment

๐Ÿ“š What We Learned

  • Production-grade IoT design and architecture
  • Real-time cloud communication using Firebase & Express
  • ML model optimization and feature engineering
  • Efficient API design and model deployment
  • Importance of accessibility & regional language support
  • Collaboration in a multidisciplinary domain like agriculture

๐Ÿ”ฎ Whatโ€™s Next for KrishiMarg

  • ๐ŸŒพ Fertilizer quantity optimization engine
  • ๐Ÿ› AI-based pest/disease detection using images
  • ๐Ÿ“ก LoRaWAN-based long-range sensor nodes
  • ๐Ÿ“ฑ Native mobile application (Android/iOS)
  • ๐Ÿ“Š Yield forecasting & costโ€“benefit dashboard
  • ๐Ÿค Partnerships with agriculture departments

Share this project:

Updates