ELIC: Efficient Learned Image Compression withUnevenly Grouped Space-Channel Contextual Adaptive Coding.
A Pytorch Implementation of "ELIC: Efficient Learned Image Compression withUnevenly Grouped Space-Channel Contextual Adaptive Coding."
Note that This Is Not An Official Implementation Code.
More details can be found in the following paper:
@inproceedings{he2022elic,
title={Elic: Efficient learned image compression with unevenly grouped space-channel contextual adaptive coding},
author={He, Dailan and Yang, Ziming and Peng, Weikun and Ma, Rui and Qin, Hongwei and Wang, Yan},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={5718--5727},
year={2022}
}
- CompressAI: https://github.com/InterDigitalInc/CompressAI
- ELIC-QVRF:https://github.com/VincentChandelier/ELIC-QVRF
- QVRF:https://github.com/bytedance/QRAF
lambda | Link |
---|---|
0.45 | 0.45 |
0.15 | 0.15 |
0.032 | 0.032 |
0.016 | 0.0016 |
0.008 | 0.008 |
0.004 | 0.004 |
According to the paper, They train the models on the largest 8000 images picked from ImageNet dataset. so download the ImageNet
unzip those download images
# cd the imagedatasetSavingDir
for tar in *.tar; do tar xvf $tar; done
Run the code to prepare the Training dataset.
This code is based on the CompressAI.
pip3 install torch torchvision torchaudio
pip3 install compressai=1.1.5
pip3 install thop, ptflops, timm
cd Code
python3 train.py -d ./dataset --N 192 --M 320 -e 4000 -lr 1e-4 -n 8 --lambda 13e-3 --batch-size 16 --test-batch-size 16 --aux-learning-rate 1e-3 --patch-size 256 256 --cuda --save --seed 1926 --clip_max_norm 1.0
In ELIC, each model is finetune by 200 epoches.
python3 train.py -d ./dataset --N 192 --M 320 -e 4000 -lr 1e-4 -n 8 --lambda 13e-3 --batch-size 16 --test-batch-size 16 --aux-learning-rate 1e-3 --patch-size 256 256 --cuda --save --seed 1926 --clip_max_norm 1.0 --pretrained --checkpoint Pretrained4000epoch_checkpoint.pth.tar
python3 -m updata.py checkpoint -n updatacheckpoint-name
python Inference.py --dataset ./dataset/Kodak --output_path ELIC_0450_ft_3980_Plateau -p /root/ELICReIm/ELIC_0450_ft_3980_Plateau.pth.tar --patch 64
We trained the network and ask the RD points from the author.