Giter VIP home page Giter VIP logo

train-a-convolutional-neural-network-cnn-to-classify-images-of-flowers's Introduction

Flower Image Classifier

This project is a part of the Udacity AI Programming with Python Nanodegree. The goal of this project is to train an image classifier using a deep learning model to recognize different species of flowers. The trained classifier can be integrated into applications, such as a smartphone app that identifies flowers through the device's camera.

Getting Started

To get started with this project, you need to follow the steps outlined below.

Prerequisites

Before running the code, make sure you have the following dependencies installed:

Python PyTorch NumPy Matplotlib Seaborn Pandas PIL tqdm Installation Clone the repository to your local machine: bash Copy code git clone https://github.com/your-username/flower-image-classifier.git cd flower-image-classifier Install the required Python packages: bash Copy code pip install -r requirements.txt Project Structure The project is structured as follows:

assets: Contains assets such as images or diagrams. data: Holds the dataset, split into training, validation, and testing sets. Image Classifier Project.ipynb: Jupyter notebook with the main project code. predict.py: Python script for making predictions using the trained model. train.py: Python script for training the image classifier. README.md: The documentation you are currently reading. Usage Follow the steps below to run the image classifier:

Open the Jupyter notebook Image Classifier Project.ipynb. Execute each cell in the notebook to train the image classifier and evaluate its performance. Once trained, you can use the predict.py script to make predictions on new images.

Project Overview

The project is divided into the following main steps:

Load and preprocess the image dataset: The dataset consists of 102 flower categories. Images are loaded and preprocessed using torchvision transformations.

Build and train the classifier: A pre-trained VGG16 network is used as the base, and a new classifier is defined and trained on the flower dataset.

Validate the model: The model's performance is evaluated on a validation set to ensure its effectiveness.

Test the network: The final step involves testing the trained network on a separate test set to measure its accuracy on new, unseen images.

Save the checkpoint: The trained model, along with necessary information like class-to-index mapping, is saved as a checkpoint for future use.

Inference for classification: A function is provided to make predictions on new images using the trained model.

Acknowledgments

This project is part of the Udacity AI Programming with Python Nanodegree. The flower dataset used in this project consists of 102 categories and can be found here.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Feel free to adapt this template based on your specific project details and requirements.

train-a-convolutional-neural-network-cnn-to-classify-images-of-flowers's People

Contributors

segzee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.