This project implements an autoencoder to compress and reconstruct images from the Fashion MNIST dataset. The autoencoder is built using TensorFlow/Keras and visualizes the reconstruction quality. Additionally, the project calculates the Structural Similarity Index (SSIM) to evaluate the performance of the model.
- Data preprocessing for the Fashion MNIST dataset.
- Autoencoder with dense layers for encoding and decoding.
- Visualization of original and reconstructed images.
- SSIM computation for evaluating reconstruction quality.
Ensure you have the following packages installed:
numpy
matplotlib
tensorflow
scikit-image
You can install the necessary packages using pip:
pip install numpy matplotlib tensorflow scikit-image
-
Clone this repository:
git clone https://github.com/KonyD/fashion-mnist-autoencoder.git cd fashion-mnist-autoencoder
-
Run the Python script:
python autoencoder_fashion_mnist.py
-
The script will display:
- Sample original and reconstructed images.
- Average SSIM score printed in the console.
-
Data Preprocessing:
- Normalizes the Fashion MNIST images to a range of [0, 1].
- Reshapes the dataset for compatibility with dense layers.
-
Model Architecture:
- Encoder: Compresses the input images into a lower-dimensional latent space.
- Decoder: Reconstructs the images from the compressed latent space.
-
Evaluation:
- Visualizes original vs. reconstructed images.
- Calculates SSIM scores for evaluating reconstruction quality.
-
Visualization of Original and Reconstructed Images:
-
SSIM Score:
SSIM: 0.7793266204555716 # Your results may vary
This project is licensed under the MIT License. See the LICENSE file for details.
- Dataset: Fashion MNIST
- Libraries: TensorFlow, Keras, NumPy, Matplotlib, Scikit-Image
Feel free to contribute or raise issues if you encounter any problems!