ZIP File Link : https://drive.google.com/file/d/1RNnODZ0IQv8bwUzo-fTsAPeMjrJvFlbA/view?usp=sharing
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.
- Multiple Python scripts create realistic greenhouse and crop datasets for:
- Tomatoes 🍅
- Cucumbers 🥒
- Peppers 🌶️
- Strawberries 🍓
- Various climate scenarios (hot, cool, worst, etc.)
- 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
- 🔐 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
| Layer | Technology |
|---|---|
| Model & Data | Python, pandas, scikit-learn, joblib |
| Frontend / Visualization | Streamlit, Plotly |
| Authentication & Database | PyMongo, bcrypt, environment variables (.env) |
git clone <repo_url>
cd <project_folder>python -m venv venv
# Activate
# Linux/Mac
source venv/bin/activate
# Windows
venv\Scripts\activatepip install -r requirements.txtCreate a .env file:
MONGO_URI=your_mongo_connection_stringpython train_model.py✅ Creates harvest_model.joblib (already provided)
streamlit run app.pyVisit 👉 http://localhost:8501
- 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
| 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 |
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! 🌾
Vivek M.
Hackathon Project — Smart Harvest Forecaster