Skip to content

abinthomasonline/alexnet-autoencoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Convolutional Autoencoder using AlexNet as Encoder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages