Skip to content

A PyTorch image classifier using RegNetY and Albumentations on the Fashion MNIST dataset. Trains with TQDM progress, plots loss curves, and supports clean modular design.

License

Notifications You must be signed in to change notification settings

anto18671/vision-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§₯ Fashion MNIST Classifier

This project is a PyTorch-based image classifier for the Fashion MNIST dataset using a RegNetY architecture from the timm library. It leverages Albumentations for image preprocessing and visualizes training and validation loss.

πŸ“¦ Dataset used: Fashion MNIST PNG Dataset on Kaggle
🧠 Model: regnety_006 from timm


πŸ“Š Sample Loss Plot

After training, the script will save the following plot to assets/loss_plot.png:

Training and Validation Loss


πŸš€ Installation

  1. Clone the repository

    git clone https://github.com/anto18671/vision-classifier.git
    cd vision-classifier
  2. Create a virtual environment (optional but recommended)

    python -m venv venv
    source venv/bin/activate  # or venv\Scripts\activate on Windows
  3. Install dependencies

    pip install -r requirements.txt

πŸ“ Dataset Structure

Download and unzip this dataset into the data/ folder, so that it looks like:

vision-classifier/
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ train/
β”‚   β”‚   β”œβ”€β”€ 0/
β”‚   β”‚   β”œβ”€β”€ 1/
β”‚   β”‚   └── ...
β”‚   └── val/
β”‚       β”œβ”€β”€ 0/
β”‚       β”œβ”€β”€ 1/
β”‚       └── ...

🏁 Run the Training

Simply run:

python train.py

This will:

  • Train the model for 24 epochs
  • Save the training/validation loss plot to assets/loss_plot.png

πŸ“¦ Requirements

Minimal requirements.txt:

torch
torchvision
timm
albumentations
opencv-python
matplotlib
tqdm

You can create this file with:

pip freeze > requirements.txt

πŸ“„ License

MIT License β€” see LICENSE

About

A PyTorch image classifier using RegNetY and Albumentations on the Fashion MNIST dataset. Trains with TQDM progress, plots loss curves, and supports clean modular design.

Topics

Resources

License

Stars

Watchers

Forks

Languages