compression_autoencoder is an open-weight model from George Perdrizet, released under MIT License. Its published files total 3.3 GB. It draws 42 downloads a month.
A convolutional autoencoder trained to compress 256×256 RGB images into a compact 1024-dimensional latent representation, achieving 192× compression ratio.
Model Card
By George Perdrizet, published under mit, revision 9d89340046ca.
A convolutional autoencoder trained to compress 256×256 RGB images into a compact 1024-dimensional latent representation, achieving 192× compression ratio. This model learns to compress high-quality images by encoding them into a compact latent space, then reconstructing them with minimal quality loss. The encoder reduces a 196,608-value image (256×256×3) to just 1024 numbers, while the decoder reconstructs the original image from this compressed representation. This model is designed for educational purposes to demonstrate how autoencoders can learn compression automatically from data, rather than using hand-crafted rules like JPEG or PNG. Trained on DF2KOST, a combined dataset of 26.8k…
Read George Perdrizet's full model card
Image compression autoencoder
A convolutional autoencoder trained to compress 256×256 RGB images into a compact 1024-dimensional latent representation, achieving 192× compression ratio.
Model description
This model learns to compress high-quality images by encoding them into a compact latent space, then reconstructing them with minimal quality loss. The encoder reduces a 196,608-value image (256×256×3) to just 1024 numbers, while the decoder reconstructs the original image from this compressed representation.
Architecture: - Encoder: Convolutional layers with downsampling (256×256×3 → 2048) - Decoder: Transposed convolutional layers with upsampling (2048 → 256×256×3) - Activation: LeakyReLU and Sigmoid - Normalization: Batch normalization
Performance: - Compression ratio: 96× - PSNR: ~22 dB dB - SSIM: >0.52
Intended use
This model is designed for educational purposes to demonstrate how autoencoders can learn compression automatically from data, rather than using hand-crafted rules like JPEG or PNG.
Use cases: - Understanding autoencoder architectures - Learning about lossy compression - Exploring latent space representations - Teaching AI/ML concepts in bootcamps
Training data
Trained on DF2K_OST, a combined dataset of 26.8k high-quality images from: - DIV2K - Flickr2K - OutdoorSceneTraining
All images resized to 256×256 pixels using Lanczos resampling.
Training details
Hyperparameters: - Optimizer: Adam (lr=1e-3) - Loss function: Mean Squared Error (MSE) - Batch size: 4 - Epochs: Up to 100 (with early stopping) - Train/validation split: 90/10
Callbacks: - Early stopping (patience=10, monitoring validation loss) - Learning rate reduction (factor=0.5, patience=5) - Model checkpoint (best validation loss)
Hardware: - Single NVIDIA P100 GPU with memory growth enabled
How to use
import shutil
from tensorflow import keras
from huggingface_hub import hf_hub_download
# Download model
downloaded_model = hf_hub_download(
repo_id='gperdrizet/compression_autoencoder',
filename='models/compression_ae.keras',
repo_type='model'
)
# Load model
autoencoder = keras.models.load_model(downloaded_model)
# Use for compression/decompression
compressed = autoencoder.predict(images) # images shape: (N, 256, 256, 3)
For complete examples, see the training notebook.
Limitations
- Fixed input size (256×256 RGB images)
- Lossy compression (some quality loss)
- Not optimized for specific image types
- Slower than traditional codecs
- Educational model, not production-ready
Project repository
Full code, training notebooks, and interactive demo: gperdrizet/autoencoders
Citation
If you use this model for educational purposes, please reference the project repository.
Identity and Version
- Repository
- gperdrizet/compression_autoencoder
- Publisher
- George Perdrizet
- Task
- Not stated by the source
- Modality
- Other
- Library
- keras
- Parameters
- Not stated by the source
- Languages
- Not stated by the source
- Revision
- 9d89340046ca1f7827db2a17908b764c8ac3a27e
- First published
- 2026-02-27
- Last updated
- 2026-09-18
Files and Weights
3 files, 3.3 GB in total.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| README.md | Documentation | 3.0 KB | — |
| models/compression_ae.keras | Other | 3.3 GB | 73d66fcb85c4 |
| .gitattributes | Repository | 1.6 KB | — |
License and Download
- License
- mit
- Access
- Open weights, no gate
Released by George Perdrizet through its official repository on Hugging Face. Read the license.
Questions About compression_autoencoder
Can I use compression_autoencoder commercially?
Yes. compression_autoencoder is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.