This project demonstrates image compression and reconstruction using a sparse autoencoder built with TensorFlow.
data/
: Contains data loading scripts and sample images.models/
: Defines the sparse autoencoder model.utils/
: Includes utility scripts for visualizing the results.main.py
: Main script to load data, train the model, and visualize results.requirements.txt
: Lists the required Python packages.
-
Install the required packages:
pip install -r requirements.txt
-
Place your sample images in the
data/sample_images/
directory. -
Run the main script to train the model and visualize results:
python train.py
The project trains a sparse autoencoder to compress and reconstruct images. The autoencoder consists of an encoder that compresses the image and a decoder that reconstructs it. The sparsity constraint encourages the model to use fewer neurons, effectively learning a more compact representation of the input data.