GitHub - Chetanpyasi/Flower-Detection: The Flower Classification Project uses the Iris dataset to classify flowers into three species (Setosa, Versicolour, Virginica) based on sepal and petal features. It demonstrates end-to-end machine learning with data preprocessing, model training (SVM), evaluation, and a reusable trained model. · GitHub
Skip to content

About

The Flower Classification Project uses the Iris dataset to classify flowers into three species (Setosa, Versicolour, Virginica) based on sepal and petal features. It demonstrates end-to-end machine learning with data preprocessing, model training (SVM), evaluation, and a reusable trained model.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🌸 Flower Classification (Iris Dataset)

This project implements flower classification using the famous Iris dataset.
It explores different machine learning approaches and includes a trained Support Vector Machine (SVM) model for prediction.


📂 Project Structure

flower-classification/
├── Iris Classification - DataFlair.ipynb   # Reference notebook
├── Iris Classification - DataFlair.py      # Python script
├── main.ipynb                              # Main project notebook
├── iris.data                               # Iris dataset (features)
├── iris.names                              # Dataset description
├── SVM.pickle                              # Pre-trained SVM model
├── main.pdf                                # Project report
├── requirements.txt                        # Dependencies 
└── README.md                               # Project documentation

📊 Dataset

  • Dataset: Iris Dataset
  • Classes:
    • Iris Setosa
    • Iris Versicolour
    • Iris Virginica
  • Features:
    • Sepal length
    • Sepal width
    • Petal length
    • Petal width

⚙️ Installation

Clone the repository and install dependencies:

git clone https://github.com/your-username/flower-classification.git
cd flower-classification
pip install -r requirements.txt

🚀 Usage

1. Run the Notebook

Open the main Jupyter notebook:

jupyter notebook main.ipynb

2. Run the Python Script

You can also execute the script directly:

python "Iris Classification - DataFlair.py"

3. Load Pre-trained Model

The SVM.pickle file contains a trained model:

import pickle

with open("SVM.pickle", "rb") as f:
    model = pickle.load(f)

sample = [[5.1, 3.5, 1.4, 0.2]]  # Example input
prediction = model.predict(sample)
print("Predicted class:", prediction)

📈 Results

  • Model: Support Vector Machine (SVM)
  • Accuracy: ~97% on test data (Iris dataset)

📝 References


🤝 Contributing

Feel free to open issues or submit pull requests if you’d like to improve this project.


📄 License

This project is licensed under the MIT License.

About

The Flower Classification Project uses the Iris dataset to classify flowers into three species (Setosa, Versicolour, Virginica) based on sepal and petal features. It demonstrates end-to-end machine learning with data preprocessing, model training (SVM), evaluation, and a reusable trained model.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages