Skip to content

This image classification project attempts to classify images of ten species of flowers that were collected by various groups and individuals in Gainesville, Florida.

Notifications You must be signed in to change notification settings

garrettbowman/Flower-Classification-ML-Team-Project

Repository files navigation


EEE3773 - Final Project - Flower Species Classification

A project utilizing transfer learning for flower species classification.

View Model Performance


Table of Contents
  1. About The Project
  2. Dependencies
  3. Setup and Usage
  4. Performance and Results
  5. Authors
  6. Acknowledgements
  7. Thank You

About The Project

This image classification project attempts to classify images of ten species of flowers that were collected by various groups and individuals in Gainesville, Florida. Pictures were taken for the following species:

  • Garden Roses
  • Southern Magnolias
  • Lilies
  • Sunflowers
  • Orchids
  • Marigold
  • Hibiscus
  • Fire Bush
  • Pentas
  • Bougainvillea

Over 125 training images of each species to be classified were amassed, as depicted in the bar graph below.

Dependencies

All necessary packages to create and test the accuracy of the image classification mentioned next only require the base packages bundled in the Anaconda python distribution

Setup and Usage

First, clone the repo!

git clone https://github.com/EEE3773-UF-Summer2022/final-project-flour-power.git
cd final-project-flour-power

Next, ensure execution of the python scripts is allowed

chmod u+x create_model.py
chmod u+x evaluate_model_performance.py

Next, copy the training imageset to the root of the project directory. The training imageset can be downloaded from canvas or found in the shared folder when working with HiperGator.


To train and create the image classification model, one may run

python create_model.py <name of training imageset> <name of training imageset labels>

NoteTo create a test dataset and its labels from the training set, the --debug flag may be used

  • Use of the debug flag is not required and is helpful when only a training dataset is provided
  • Use of the --debug flag is seen below

For example, to create a model with the training images and corrected training labels as well as save a derived test set, one may run

python create_model.py data_train.npy corrected_labels.npy --debug

The script will output an image classification model in the h5 format, "image_model.h5" when it has ran successfully.

NoteTo use a pre-existing model, simply:

  • Skip execution of the create_model.sh
  • Copy your model file to the root of the project directory
  • Specify your model file when running "evaluate_model_performance.py" as seen below

To evaluate the model's performance against a user-specified training or testing image set, one may run

python evaluate_model_performance.py <filename of dataset> <filename of dataset labels <filename of model.h>

WarningThe evaluate_model_performance.py script EXPECTS that the dataset specified is in following format

  • 270,000 x M (numpy array, where M is the number of test samples)

For example, to evaulate the performance of the model with the debug test set generated above, one may run

python evaluate_model_performance.py debug/X_test_from_training.npy debug/X_test_from_training_labels.npy image_model.h5


A jupyter notebook, 'Final Project - Training and Testing Examples.ipynb' has also been included in this repo. This notebook includes example code to run the test and train scripts detailed above.


Performance and Results

The following accuracy was seen when using the test set and its labels generated from the --debug option with the training set


Authors

Project Link: https://github.com/EEE3773-UF-Summer2022/final-project-flour-power.git

Acknowledgements

Thank you

If you made it this far, thank you for reading along and possibly testing our model's performance!





This README was proudly written 100% with nano :)

About

This image classification project attempts to classify images of ten species of flowers that were collected by various groups and individuals in Gainesville, Florida.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published