PyTorch implementation for learned lossless image compression (CVPR'19 paper)
Top 73.2% on sourcepulse
This repository provides a PyTorch implementation of the L3C system for learned lossless image compression, achieving state-of-the-art results that outperform traditional codecs like PNG and WebP. It is targeted at researchers and engineers in computer vision and image processing interested in efficient lossless compression techniques.
How It Works
L3C employs a fully parallelizable hierarchical probabilistic model for adaptive entropy coding. Unlike autoregressive models that operate solely in RGB space, L3C jointly models the image distribution with learned auxiliary representations. This approach requires only three forward passes for all pixel probabilities, offering a significant speedup (over two orders of magnitude) compared to methods like PixelCNN. The learned auxiliary representations are crucial for performance, outperforming predefined ones.
Quick Start & Requirements
conda create --name l3c_env python=3.7 pip
), activate it (conda activate l3c_env
), and install dependencies (conda install pytorch=1.1 torchvision cudatoolkit=10.0 -c pytorch
, pip install -r pip_requirements.txt
). Install torchac
separately as described in the README for entropy coding.scikit-image
and awscli
are needed for data preprocessing.Highlighted Details
torchac
) for fast arithmetic coding with optional CUDA support.Maintenance & Community
The project is associated with ETH Zurich. The README mentions an update to the repo (issue #14) and provides contact information via email (in the paper) or GitHub issues for questions.
Licensing & Compatibility
The repository does not explicitly state a license in the README. However, the nature of the project and its academic origin suggest it is likely intended for research purposes. Commercial use would require clarification of licensing terms.
Limitations & Caveats
PyTorch 1.2 is not supported. The code does not natively support multi-GPU training, requiring modifications for nn.DataParallel
. The torchac
module's CUDA compilation can be sensitive to specific GCC and NVCC versions. Data preprocessing for Open Images is resource-intensive.
2 years ago
1 week