/img-comp-reference

[ICLR2021] Learning Accurate Entropy Model with Global Reference for Image Compression

Primary LanguagePython

Python >=3.5 PyTorch >=1.0

[ICLR2021] Learning Accurate Entropy Model with Global Reference for Image Compression [pdf]

The official repository for Learning Accurate Entropy Model with Global Reference for Image Compression.

Pipeline

framework

Evaluation on Kodak Dataset

result

Requirements

Prerequisites

Clone the repo and create a conda environment as follows:

conda create --name ref python=3.6
conda activate ref
conda install pytorch=1.1 torchvision cudatoolkit=10.0

(We use PyTorch 1.1, CUDA 10.1.)

Test Datasets

Kodak Dataset

kodak
├── image1.jpg 
├── image2.jpg
└── ...

Evaluation & Comress & Decompress

Evaluation:

# Kodak
sh test.sh [/path/to/kodak] [model_path]

Compress:

sh compress.sh original.png [model_path]

Decompress:

sh decompress.sh original.bin [model_path]

Trained Models

Download the pre-trained models optimized by MSE.

Note: We reorganize code and the performances are slightly different from the paper's.

Acknowledgement

Codebase from L3C-image-compression , torchac

Citation

If you find this code useful for your research, please cite our paper

@InProceedings{Yichen_2021_ICLR,
    author    = {Qian, Yichen and Tan, Zhiyu and Sun, Xiuyu and Lin, Ming and Li, Dongyang and Sun, Zhenhong and Li, Hao and Jin, Rong},
    title     = {Learning Accurate Entropy Model with Global Reference for Image Compression},
    booktitle = {International Conference on Learning Representations},
    month     = {May},
    year      = {2021},
}