Giter Site home page Giter Site logo

luisjdtt / machine-learning-itm-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.13 MB

Multi-class classification of footwear images using a convolutional neural network. Dataset and trained model available

Python 100.00%
classification deep-learning machine-learning multiclass-image-classification python pytorch

machine-learning-itm-project's Introduction

Multi-class classification of footwear images

Project for machine learning class at ITM.

Logo

Requirements

This project requires Python 3.9.

Main dependencies:

  • numpy==1.24.3
  • opencv-python==4.7.0.72
  • scikit-learn==1.2.2
  • torch==2.0.1
  • torchvision==0.15.2
  • matplotlib==3.7.1

For data preprocessing:

  • imagededup==0.3.2

Dataset

To get started, follow these steps:

  • Download the dataset zip file from this link
  • Extract the contents of the zip file to the machine-learning-itm-project/data/ directory.

Trained model

To use the pre-trained model for inference, please perform the following steps:

  • Download the model from this link
  • Move the downloaded model file to the machine-learning-itm-project/models/ directory.

Inference on a single image

Before running the inference code, ensure that all the dependencies are installed and the trained model is downloaded and placed in the correct location.

The code for inference can be found in the machine-learning-itm-project/src/inference.py file.

Execute the following comand on the terminal:

python src/inference.py --checkpoints_path=models/model_acc76.pth --image_path=data/footwear/sneakers/sneakers10.jpg --device=cpu

Please adjust the checkpoints_path and image_path arguments as needed, specifying the paths to the trained model and the image you want to perform inference on. Also, ensure that the device argument is set correctly for your system (cpu or gpu).

Results

The model achieves 76.8% accuracy on validation set. The confusion matrix was calculated using the validation set (10% of dataset).

Accuracy Graph

Loss Graph

Confusion Matrix

machine-learning-itm-project's People

Watchers

 avatar  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.