A Pytorch Implementation of a continuously rate adjustable learned image compression framework, Gained Variational Autoencoder(GainedVAE).
Note that It Is Not An Official Implementation Code.
More details can be found in the following paper:
Asymmetric Gained Deep Image Compression With Continuous Rate Adaptation.
Huawei Technologies, CVPR 2021
Ze Cui, Jing Wang, Shangyin Gao, Tiansheng Guo, Yihui Feng, Bo Bai
Reproduce Implementation of the following paper:
INTERPOLATION VARIABLE RATE IMAGE COMPRESSION
Alibaba Group, arxiv 2021.9.20
Zhenhong Sun, Zhiyu Tan, Xiuyu Sun, Fangyi Zhang, Yichen Qian, Dongyang Li, Hao Li
- Python == 3.7.10
- Pytorch == 1.7.1
I use a part of the OpenImages Dataset to train the models (train06, train07, train08, about 54w images). You can download from here. Download OpenImages
Maybe train08 (14w images) is enough.
Train Your Own Model
python3 trainGain.py -d /path/to/your/image/dataset/ –epochs 200 -lr 1e-4 –batch-size 16 –model-save /path/to/your/model/save/dir –cuda
I try to train the Gained Mean-Scale Hyperprior model and here is the result.
The framework is based on CompressAI, I add the model in compressai.models.gain, compressai.models.gain_utils.
And trainGain/trainGain.py is modified with reference to compressai_examples/train.py.
More Variable Rate Image Compression Repository
Feel free to contact me if there is any question about the code or to discuss any problems with image and video compression. ([email protected])