KrishivSeth AI INSPIRATION STORY:
In many villages, farmers don’t fail because they lack effort — they fail because they lack predictive intelligence. They decide crops based on tradition, not data. They sell in mandis without knowing future price trends. They overuse water and fertilizers because advisory systems are generic, not hyper-local. After studying platforms like Crop in and nurture farm, we noticed something critical: They provide data, but not decision optimization. There is no system that answers: “What should this farmer grow, this season, on this land, to maximize net profit with minimal risk?” That gap inspired us to build an AI-driven agricultural profit engine — not just an advisory app, but a decision-making system that predicts ROI, optimizes inputs, and connects farmers directly to high-value buyers. We believe farming should move from guesswork to algorithmic precision.
KrishivSeth AI – AI for Agriculture Inspiration India is one of the largest agricultural economies, yet farmers face:
Late disease detection Unpredictable weather Poor market price awareness Excess fertilizer usage Lack of localized advisory Our mission is making AI accessible to every farmer using only a smartphone.
What it does Crop Disease Detection Farmers upload an image → AI predicts disease → treatment suggestion provided.
💡 What It Does 🌿 1. Crop Disease Detection (CNN Based) We classify plant leaf images using Convolutional Neural Networks. Image transformation: $$ I' = W * I + b $$ Convolution operation: $$ S(i,j) = (I * K)(i,j) = \sum_m \sum_n I(m,n)K(i-m,j-n) $$
Activation function (ReLU):
$$ ReLU(x) = \max(0,x) $$
Softmax classification:
$$ P(y=i|x) = \frac{e^{z_i}}{\sum_{j} e^{z_j}} $$
Cross-entropy loss:
$$ Loss = -\sum y \log(\hat{y}) $$
Python Model Code import tensorflow as tf from tensorflow.keras import layers, models
model = models.Sequential([ layers.Conv2D(32, (3,3), activation='relu', input_shape=(128,128,3)), layers.MaxPooling2D((2,2)), layers.Conv2D(64, (3,3), activation='relu'), layers.MaxPooling2D((2,2)), layers.Flatten(), layers.Dense(128, activation='relu'), layers.Dense(10, activation='softmax') ])
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'] Accuracy calculation:
\( Accuracy = \frac{Correct\ Predictions}{Total\ Predictions} \)
🌦 Weather-Based Advisory
Evapotranspiration model: ET0=Δ+γ(1+0.34u2)0.408Δ(Rn−G)+γT+273900u2(es−ea)
Soil Moisture Index: SMI= Field Capacity Current Moisture
If SMI<0.5⇒Irrigation=Required Uses forecast data to suggest irrigation timing.
Example moisture estimation:
$$ Soil\ Moisture\ Index = \frac{Rainfall + Irrigation}{Evaporation + Crop\ Usage} $$
```const axios = require('axios');
async function getWeather(city) {
const response = await axios.get(
https://api.weatherapi.com/v1/current.json?key=API_KEY&q=${city}
);
return response.data;
}```
Market Price Intelligence
Displays mandi prices to optimize selling decisions.
Profit estimation formula:
$$ Profit = Selling\ Price - Production\ Cost $$ Using Linear Regression \y=β0+β1x1+β2x2+ϵ\ $$ MSE=n1i=1∑n(yi−y^i)2 $$
$$ θ:=θ−α∇J(θ) $$
```from sklearn.linear_model import LinearRegression
model = LinearRegression() model.fit(X_train, y_train)
predicted_price = model.predict(X_test)```
🧪 Fertilizer Optimization
Recommends fertilizer quantity based on soil nutrients.
\( Recommended\ Fertilizer = Required\ Nutrient - Available\ Nutrient \)
AI Decision Engine Using Logistic Regression $$ P(Disease)=1+e−z1
z=w1x1+w2x2+b
P(A∣B)=P(B)P(B∣A)P(A) $$
System Architecture
Farmer → Mobile App → API Gateway → AI Model → Decision Engine → Recommendation
Time Complexity: $$ CNN Training :O(n⋅d⋅k2) , Inference : O(d⋅k2) $$
Multilingual Voice Support
Speech-to-text and text-to-speech integration for accessibility.
--
How we built it
Frontend
- Flutter / React Native
AI Model
- CNN-based classifier
- Built using TensorFlow / PyTorch
Loss function:
$$ Loss = -\sum y \log(\hat{y}) $$
Backend
- Node.js / Firebase
- REST APIs for weather and mandi data
⚔ Challenges we ran into
- Low-quality image inputs
- Limited dataset for regional crops
- Ensuring safe fertilizer recommendations
- Real-time API integration
- UI simplicity for rural users
Regularization : Lreg=L+λ∣∣w∣∣2
Dropout: y=f(Wx)⋅mask
Performance Metrics
Precision: Precision=TP/TP+FP
Recall=TP/TP+FN
F1 Score: F1=2⋅Precision+RecallPrecision⋅Recall
Future Work:
LSTM for time-series price prediction:ht = σ(Whht−1+Wxxt) Reinforcement Learning for irrigation control:Q(s,a)=Q(s,a)+α[r+γmaxQ(s′,a′)−Q(s,a)]
Accomplishments that we're proud of
- High validation accuracy
- Working end-to-end prototype
- Voice interaction support
- Scalable backend architecture
What we learned
- Dataset quality directly impacts model performance
- Simplicity improves adoption
- Real-world deployment constraints differ from lab environments
What's next for KrishivSeth AI
Phase 1 – Pilot Deployment
- Field testing with farmers
Phase 2 – Advanced AI
- Soil nutrient prediction
- Pest outbreak forecasting
Outbreak prediction model:
$$ P(Disease) = \frac{1}{1 + e^{-z}} $$
Phase 3 – Scale
- Government partnerships
- Nationwide deployment
How Melange Is Used in KrishivSeth AI
KrishivSeth AI uses Melange AI to deploy and run machine learning models directly on the device without relying on cloud infrastructure.
- Model Deployment
The crop disease detection model was converted into a lightweight TensorFlow Lite format and uploaded to the Melange model library.
This enables the model to run efficiently on-device.
Model Used
crop_model.tflite
- On-Device Inference
Instead of sending images to a cloud server, Melange executes the AI model locally.
Workflow:
Leaf Image ↓ Melange On-Device Runtime ↓ TensorFlow Lite Model ↓ Disease Prediction
This ensures:
• offline functionality • fast response time • privacy preservation
- Input Tensor Testing
To validate the model inside Melange, a test tensor was generated.
leaf_input.npy
This tensor represents a processed crop leaf image and allows the Melange platform to simulate real device inference.
- AI Features Powered by Melange Feature AI Type Crop Disease Detection Computer Vision Plant Health Scanner Image Analysis Pest Identification Object Detection Offline Crop Advisory Local AI inference
All these models run directly on the device through Melange.
- Why Melange Is Important in This Project
Melange enables KrishivSeth AI to work without internet connectivity, which is critical for farmers in rural areas.
Benefits:
• Offline AI predictions • Low latency results • Privacy-preserving inference • Energy-efficient edge deployment
Models Used in the Project
Your project mainly uses Computer Vision models for crop disease detection and plant health analysis.
Primary Model
MobileNetV2
Why this model:
Lightweight
Fast inference
Designed for mobile devices
Ideal for on-device AI
This model was trained in Google Colab and then converted to TensorFlow Lite.
2.) Training Pipeline (Google Colab)
The AI model training was done in Google Colab using TensorFlow.
Steps:
Load crop disease dataset
Train MobileNetV2 CNN model
Validate model accuracy
Export trained model
Example output:
Model accuracy: 92% 3️⃣ Model Conversion for On-Device AI
After training, the model was converted to TensorFlow Lite so it can run on mobile devices.
Converted file:
crop_model.tflite
This reduces:
model size
memory usage
inference time
4.) Deployment on Melange
The optimized model was then uploaded to Melange AI.
Melange runs the AI model locally on the device.
Workflow:
Leaf Image ↓ Melange Runtime ↓ TensorFlow Lite Model ↓ Disease Prediction
This enables:
• offline AI predictions • faster processing • privacy-preserving AI
5.)Input Tensor Used in Melange
To test the model in Melange, a tensor input file was generated.
Example:
leaf_input.npy
This tensor represents a preprocessed leaf image.
6.) AI Features Powered by These Models Feature Model Type Crop Disease Detection - MobileNetV2 CNN Plant Health Scanner - Image Classification Pest Detection - Computer Vision Crop Advisory - Rule-based ML
Log in or sign up for Devpost to join the conversation.