Metadata-Version: 2.4
Name: fashion-mnist-classifier
Version: 0.1.4
Summary: An image classification model for Fashion MNIST using PyTorch Lightning.
Author-email: Ainhoa Del Rey <delrey.132148@e.unavarra.es>, Iñigo Goikoetxea <goicoechea.128710@e.unavarra.es>, Maria Ines <haddad.179806@e.unavarra.es>
License: MIT
Project-URL: Homepage, https://github.com/tu_usuario/fashion-mnist-classifier
Project-URL: Bug Tracker, https://github.com/tu_usuario/fashion-mnist-classifier/issues
Keywords: pytorch,lightning,fashion-mnist,image-classification
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: numpy>=2.3.3
Requires-Dist: pytorch-lightning>=2.5.5
Requires-Dist: gradio>=4.0.0
Requires-Dist: scikit-learn>=1.7.2
Requires-Dist: seaborn>=0.13.2
Requires-Dist: torch>=2.8.0
Requires-Dist: torchvision>=0.23.0
Requires-Dist: scipy>=1.16.2

## Description

This project implements an image classification model based on the Fashion MNIST dataset, using PyTorch Lightning to structure the code in a modular and scalable way.
The dataset is loaded directly from `torchvision.datasets`. The goal is to train a simple convolutional network that classifies images into 10 different clothing categories.

## Project Structure

```
fashion-mnist-classifier/
├── models/               # Directory for saved models and checkpoints
├── reports/              # Evaluation reports and generated figures
├── src/
│   └── my_project/       # Project source code
│       ├── __init__.py
│       ├── app.py        # Gradio application
│       ├── config.py     # Configurations and parameters
│       ├── dataset.py    # Dataset and DataModule
│       ├── model.py      # PyTorch Lightning model
│       ├── plots.py      # Visualization functions
│       └── train.py      # Main training script
├── .gitignore
├── LICENSE               # Project license
├── pyproject.toml        # Project metadata and dependencies
└── README.md             # This file
```

## Installation
To install dependencies and prepare the environment with uv, run the following commands in the terminal:
1. Download and install dependencies: curl -sSf https://uv.io/install.sh | sh
2. Initialize the environment: uv init
3. Sync dependencies and environment: uv sync

## Training and Evaluation
To run the training and evaluation script, first install the package in editable mode:

```bash
uv pip install -e .
```

Then, run the following command in the terminal:

```bash
fashion-mnist-classifier
```

## Building and Publishing to PyPI
To build and publish the package to PyPI, follow these steps:

1.  **Install build tools:**
    ```bash
    uv pip install build twine
    ```
2.  **Build the package:**
    ```bash
    python -m build
    ```
3.  **Publish to PyPI:**
    ```bash
    twine upload dist/*
    ```
    You will be prompted for your PyPI username and password.


## Technical Details
-Dataset: `torchvision.datasets.FashionMNIST` with custom transformations.
-Model: Simple CNN with one convolutional layer, pooling, and fully connected layers.
-Training: Implemented with PyTorch Lightning to facilitate handling epochs, performance, and metrics.
-Configuration: Parameters such as batch size, paths, epochs defined in config.py.
-Optimization: Adam with CrossEntropyLoss.

## Reports & Visualizations
The project includes detailed reports and visualizations:
- **Confusion matrix**
- **Per-class accuracy**
- **Calibration curve**
- **Misclassified image grids**
- **Pixel distribution analysis**

All outputs are stored in the `reports/` folder.

## Contact
-delrey.132148@e.unavarra.es
-goicoechea.128710@e.unavarra.es
-haddad.179806@e.unavarra.es
