Skip to content

Repository files navigation

ZIP File Link : https://drive.google.com/file/d/1RNnODZ0IQv8bwUzo-fTsAPeMjrJvFlbA/view?usp=sharing

🌾 Smart Harvest Forecaster — Complete Project Details

🧠 Overview

Smart Harvest Forecaster is an intelligent crop analytics dashboard designed for greenhouse growers.
It leverages AI and modern UI design to turn raw climate and growth data into actionable predictions about harvest timing, crop yield, and operational readiness.
Built for hackathon rapid development, all elements — from synthetic data generation to model training and modern dashboarding — are included.


🚀 Features

🌱 Simulated Data Generation

  • Multiple Python scripts create realistic greenhouse and crop datasets for:
    • Tomatoes 🍅
    • Cucumbers 🥒
    • Peppers 🌶️
    • Strawberries 🍓
    • Various climate scenarios (hot, cool, worst, etc.)

🤖 Trained Machine Learning Model

  • A Random Forest Regression model predicts fruit weight progression using:
    • Climate variables (temperature, light intensity)
    • Days since planting
  • Trained on 7,687 rows from 8 scenario datasets

Model Performance:

  • 🧩 R² Score: 86.11%
  • ⚖️ RMSE: 37.40 grams

📊 Streamlit Dashboard App

  • 🔐 Secure authentication with MongoDB
  • 📁 CSV upload and dynamic threshold setting
  • 📅 Interactive calendar showing optimal harvest windows
  • 📈 Visualizations: Line charts, histograms, pie charts, scatterplots, box plots
  • 🧭 Tabbed Navigation:
    • Growth Forecast
    • Climate Analysis
    • Growth Correlations
    • Additional Analytics
    • AI-Powered Recommendations
  • 🪄 Expanders and banners for actionable harvest insights

🧩 Tech Stack

Layer Technology
Model & Data Python, pandas, scikit-learn, joblib
Frontend / Visualization Streamlit, Plotly
Authentication & Database PyMongo, bcrypt, environment variables (.env)

⚙️ Installation & Execution

1️⃣ Clone this repository

git clone <repo_url>
cd <project_folder>

2️⃣ Setup Virtual Environment

python -m venv venv
# Activate
# Linux/Mac
source venv/bin/activate
# Windows
venv\Scripts\activate

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Configure MongoDB

Create a .env file:

MONGO_URI=your_mongo_connection_string

5️⃣ (Optional) Train the Model

python train_model.py

✅ Creates harvest_model.joblib (already provided)

6️⃣ Launch the Dashboard

streamlit run app.py

Visit 👉 http://localhost:8501


🧭 User Workflow

  • Register / Login: Secure authentication with credentials stored in MongoDB (hashed passwords)
  • Upload Data: Upload crop growth and climate CSV (sample provided), then set your threshold
  • Explore Dashboard: View model predictions, harvest calendar, trends, climate impact, and AI recommendations
  • Plan Harvest: Expandable action plans and expert suggestions to prepare for each harvest stage

📈 Model and Analytics

Parameter Description
Algorithm Random Forest Regression
Performance R² = 86.11%, RMSE = 37.40g
Forecasting Generates day-by-day fruit weight predictions and optimal harvest windows

🏁 Conclusion

Smart Harvest Forecaster combines data science, visualization, and agricultural intelligence to empower growers with data-driven decisions.
It’s a step toward sustainable, AI-powered farming — making smart harvesting truly possible! 🌾


✨ Author

Vivek M.
Hackathon Project — Smart Harvest Forecaster

About

Smart Harvest Forecaster is an AI-powered crop analytics dashboard that predicts harvest time, yield, and growth readiness using greenhouse climate data, helping farmers optimize production and decision-making.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages