-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
Description
Currently, CropChain tracks a batch after it has been harvested. We want to expand the project's value by helping farmers decide what to plant before the season begins.
By integrating a Machine Learning model, we can provide data-driven crop suggestions based on soil health and environmental factors. This minimizes crop failure and maximizes yield for the farmers using our platform.
Goals
- Transition CropChain from a passive tracker to an active agricultural advisor.
- Provide high-accuracy crop suggestions based on
$N$ (Nitrogen),$P$ (Phosphorous),$K$ (Potassium), pH, Rainfall, and Temperature. - Implement a seamless API bridge between a Machine Learning model and the React Dashboard.
Tasks
1. Model Development & Training
- Dataset Acquisition: Use the Crop Recommendation Dataset (contains 2200 records with 22 different crops).
- Model Training: Implement a Random Forest Classifier or XGBoost using Scikit-Learn.
- Export Model: Save the trained model as a .pkl (Pickle) or .joblib file for backend deployment.
- Backend Integration (/recommend API)
- Service Layer: Create a Python/Flask microservice or use onnxruntime in Node.js to host the model.
- Endpoint Setup: Create a POST /api/v1/recommend endpoint that accepts:Soil Nutrients: { N, P, K, pH }Environment: { temperature, humidity, rainfall }
- Validation: Use Joi to ensure all soil parameters are within realistic biological ranges.
- Frontend Dashboard Integration
- Recommendation Form: Build a "Smart Planting" UI section with a minimalist, Apple-style input form.
- Visual Results: Display the recommended crop with an image and a "Confidence Score" (e.g., "We recommend Rice (94% Match)").
- Quick-Start: Add a button to "Create Batch" immediately using the recommended crop data.
Value Addition
- For Farmers: Reduces the risk of planting the wrong crop in unsuitable soil.
- For the Supply Chain: Predicts what crops will enter the market in the coming months, helping Mandis and Retailers plan ahead.
- For Sustainability: Encourages optimal resource use (water and fertilizers).
Definition of Done
- ML Model achieves >90% accuracy on test data.
-
/recommendendpoint returns a valid crop suggestion in under 200ms. - The Farmer Dashboard features a dedicated "AI Advisory" tab.
- Form is fully responsive and matches the project's design system.
Labels: enhancement, Hard
Reactions are currently unavailable