Inspiration
Crop prices in India can swing wildly within days driven by weather, supply gluts, transport bottlenecks, or a policy change nobody saw coming. Farmers, who carry all the production risk, are usually the last to see a price move coming. Meanwhile, grading harvested crop and seed quality is still done almost entirely by eye, so two equally good harvests can get valued differently depending on who's judging that day. We wanted to see whether two fairly different flavors of machine learning a time-series model and a computer vision model could tackle both problems side by side, using real government data instead of a toy dataset. Working with 5 years of price and weather data from Madhya Pradesh (Agmarknet, plus 12 cities including Bhopal, Gwalior, Indore, and Jabalpur) made the problem feel immediate rather than academic.
What it does
FutureFarm is a two-model AI system behind a single, farmer-facing dashboard:
- Price forecasting an LSTM network trained on historical mandi prices (Agmarknet) and regional weather data predicts the minimum and maximum price of a crop for the next 7 days, shown as a simple chart.
- Seed/crop quality grading a YOLO-based computer vision model takes a photo of a harvested crop or seed and instantly classifies it as Intact, Immature, Broken, or Skin-damaged.
A farmer opens the dashboard, taps "Predict Today's Prices" to see where a crop's price is headed, or uploads a photo under "Analysis" for an instant quality grade no spreadsheets or technical background required. Beyond farmers themselves, mandi traders, agri-input retailers, and agricultural policy planners get the same price-trend visibility.
How we built it
We split the system into four stages:
- Data gathering — crop price records from Agmarknet (Govt. of India), and 5 years of weather data for 12 Madhya Pradesh cities via Kaggle.
- Preprocessing — cleaning and normalizing both datasets so a price record and its matching weather conditions line up correctly by date and city.
- Model training — an LSTM trained on the merged price + weather time series to forecast future min/max prices, and a YOLO model trained separately on labeled crop/seed images to classify quality.
- Serving — both trained models sit behind a Flask web app with a simple HTML/CSS dashboard, so a forecast or a quality grade is one click away.
Stack: Python, TensorFlow (LSTM + YOLO), OpenCV, pandas, NumPy, Matplotlib, Flask, MySQL/CSV for storage, and Jupyter Notebook / Google Colab for development.
Challenges we ran into
Price forecasting turned out to be the harder of the two problems. Crop prices don't just follow their own history — they jump because of a policy announcement, a local supply shock, or a transport disruption, none of which show up in past price or weather data. Our LSTM's R² came out close to zero, a clear signal that pure historical-pattern matching has a ceiling here, and we had to be honest with ourselves about what the model could and couldn't promise rather than overselling the forecast.
On the vision side, the main confusion was between "Immature" and "Intact" crops — visually the two categories can look close depending on lighting and angle, and that's where nearly all of our YOLO model's (small number of) misclassifications came from. Lining up two very differently-shaped datasets — daily price records and multi-city weather records — so every row referred to the same place and date was also fiddlier than it sounds.
Accomplishments that we're proud of
The YOLO quality-grading model hit 98% precision, recall, F1, and accuracy across all four grading classes — strong enough to trust for real grading use, not just a demo. More broadly, we're proud of building a genuinely complete pipeline — from raw government price data and public weather data, through two different trained models, to a working dashboard a non-technical farmer could actually use rather than stopping at a notebook full of experiments. We also chose to report both models' real performance, including the LSTM's limitations, instead of only showcasing the flattering number.
What we learned
The biggest lesson was about the limits of historical data: agricultural prices are shaped by real-world events policy, weather shocks, local supply that a model trained purely on the past can't foresee, so time-series forecasting for commodities needs to be framed as a trend signal, not a guarantee. We also learned a lot about combining two very different ML approaches — tabular time-series and computer vision into a single coherent product, and how much of the real work in an applied ML project is data plumbing (aligning prices, weather, and images by date and location) rather than model architecture.
What's next for FutureFarm
- Bring in soil condition and IoT sensor data to sharpen price forecasts
- Ship a native mobile app, since most of our target users are mobile-first
- Add Hindi and regional-language support so the dashboard isn't English-only
- Expand beyond the current Madhya Pradesh dataset to more crops and states


Log in or sign up for Devpost to join the conversation.