Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Script and CNN Model for 2023/2024 IMLO Individual Assessment

This project implements a Convolutional Neural Network for classifying flower images from the Oxford Flowers-102 dataset using PyTorch.

It is strongly recommended to run the training program on a computer with a GPU.

Set up

  1. Clone repository:

    git clone git@github.com:talaha3/IMLO-Coursework.git
  2. Create the Python virtual environment:

    cd IMLOAssessment
    python -m venv myenv
  3. Activating virtual environment:

    On Windows:

    ./myenv/Scripts/activate.bat

    On Mac and Linux:

    $ source myvenv/bin/activate
  4. Install the required packages:

    pip install -r requirements.txt

Usage

Training the model using training dataset

python finalClassifier.py

Testing the train model on test dataset

python modelTest.py

Files

/attempts: Contains previous attempts at creating classifier.

finalClassifier.py: Trains the model and saves most accurate parameter configuration.

modelTest.py: Loads saved model and tests accuracy on the test dataset.

bestmodel.pt: Saved model with trained parameters yielding highest accuracy.

dataset_mean_std.py: Calculates and prints the mean and standard deviation of the training set.

requirements.txt: List of pip packages required to run the program.

About

Python script and CNN Model for 2023/2024 IMLO Individual Assessment

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages