Skip to content

"A machine learning project that develops a robust predictive model for diamond prices by analyzing physical characteristics and market trends. This project includes data preprocessing, feature engineering, model building, evaluation, and deployment of a user-friendly web application using Flask."

Notifications You must be signed in to change notification settings

rohanhake98/Crop-and-Fertilizer-Recommendation-System

Repository files navigation

🌱 Smart Crop Recommendation System

Project Banner
Example of the interactive recommendation interface

📖 Table of Contents

🌟 Project Overview

An AI-powered web application that helps farmers select the most suitable crops and fertilizers based on soil properties and environmental conditions. The system combines machine learning with agricultural domain knowledge to provide personalized recommendations.

✨ Key Features

  • Crop Recommendation: Suggests top 3 most suitable crops
  • Fertilizer Guidance: Recommends organic and chemical fertilizers
  • Interactive UI: User-friendly interface with sliders for easy input
  • Probability Visualization: Shows confidence levels for recommendations
  • Multi-Dataset Integration: Combines soil, weather, and crop yield data

🏗 Technical Architecture

graph TD
    A[User Input] --> B(Preprocessing)
    B --> C{Machine Learning Models}
    C --> D[Crop Recommendation]
    C --> E[Fertilizer Suggestion]
    D --> F[Results Visualization]
    E --> F
🛠 Installation Guide
Prerequisites
Python 3.8+

Jupyter Notebook

pip package manager

Setup Instructions
Clone the repository:

bash
git clone https://github.com/yourusername/crop-recommendation-system.git
cd crop-recommendation-system
Install dependencies:

bash
pip install -r requirements.txt
Download datasets and place in data/ folder:

Crop Recommendation Dataset

Fertilizer Dataset

🚀 Usage Instructions
Running in Jupyter Notebook
python
# Load models
crop_model = joblib.load('models/crop_model.pkl')
fert_model = joblib.load('models/fertilizer_model.pkl')

# Run interactive UI
%run interactive_ui.ipynb
Running as Web Application
bash
python app.py
Then visit http://localhost:5000 in your browser

📊 Dataset Information
The system uses four primary datasets:

Dataset	Features	Samples	Description
Crop Data	N, P, K, pH, etc.	2,200	Soil parameters and crop labels
Fertilizer Data	NPK values, crop types	8,000	Fertilizer recommendations
District Data	Regional yield statistics	5,000	Location-based crop performance
Farming Data	Sensor measurements	10,000	Detailed field conditions
📈 Model Performance
Model	Accuracy	Precision	Recall	F1-Score
Crop Classifier	92.3%	0.91	0.93	0.92
Fertilizer Recommender	88.7%	0.89	0.88	0.885
📸 Screenshots
Interactive Interface
https://./finalOp.png

Recommendation Results
https://./screenshots/results-display.png

To add your own images:

Place images in the images/ folder

Update the markdown references:

markdown
![Alt Text](./images/your-image.jpg)
🚀 Future Enhancements
Mobile application version

Multi-language support

Weather API integration

Disease prediction module
Loading

About

"A machine learning project that develops a robust predictive model for diamond prices by analyzing physical characteristics and market trends. This project includes data preprocessing, feature engineering, model building, evaluation, and deployment of a user-friendly web application using Flask."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published