Skip to content

Latest commit

 

History

History
72 lines (61 loc) · 2.65 KB

README.md

File metadata and controls

72 lines (61 loc) · 2.65 KB

Convolutional Autoencoder with AlexNet Encoder on Imagenette Dataset

This repository contains an implementation of a Convolutional Autoencoder using the AlexNet architecture as the encoder. The autoencoder is a type of neural network used for unsupervised learning, particularly in the field of dimensionality reduction and image reconstruction.

The autoencoder is trained on the Imagenette dataset, which is a subset of 10 easily classified classes from the Imagenet dataset.

Results

Reconstructed Images Loss Curve

Table of Contents

Installation

  1. Clone the repository
    git clone https://github.com/abinthomasonline/alexnet-autoencoder.git
    
  2. Install the required packages
    cd alexnet-autoencoder
    pip install -r requirements.txt
    

Dataset

The demo uses the Imagenette dataset. The dataset can be downloaded from here. Download the dataset and extract it to the data directory.

wget https://s3.amazonaws.com/fast-ai-imageclas/imagenette2.tgz -P data/
tar -xzf data/imagenette2.tgz -C data/

Usage

Train

python train.py

The checkpoints and metrics will be saved in the checkpoints directory.

Plot

python plot.py

Plots of loss curve and reconstructed images will be saved in the plots directory.

Files

alexnet-autoencoder/
├── checkpoints/                
│   ├── best.pt                 # Best checkpoint
│   ├── epoch_{i}.pt            # Checkpoint at epoch i
│   ├── latest.pt               # Checkpoint at latest epoch
│   └── metrics.json            # Metrics
├── data/                       
│   └── imagenette2/            # Imagenette dataset
├── plots/                      
│   ├── loss.png                # Loss curve
│   └── reconstructions.png     # Reconstructed images
├── model.py                    # Model definition
├── plot.py                     # Plotting
├── README.md                   # This file
├── requirements.txt            # Requirements file
└── train.py                    # Training

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.