e2e_gdn
《End-to-end optimized image compression》
key words:image compression, generalized divisive normalization
e2e_gd proposes an image compression method, consisting of a nonlinear analysis transformation, a uniform quantizer, and a nonlinear synthesis transformation. It exhibits better rate–distortion performance than the standard JPEG and JPEG 2000 compression methods.
our contibutions
1.translate from pytorch to mindspore
2.successfully run forward, backward and parameter update
3.test and compare between the mindspore version and the pytorch version with pretrained parameter
file structure
the translated model file is e2e_gdn/model.py
the pretrain paremeter is e2e_gdn_torch/e2e_pretrain.pth for pytorch and e2e_gdn/e2e_pretrain.ckpt for mindspore
environment
- mindspore-dev==2.0.0dev20230116
- ubuntu 16.04
- cuda 11.1
- python 3.7
command
to use the translated model, check
from model import ImageCompressor
model = ImageCompressor
test
use test_ms.py to test mindspore model
cd e2e_gdn
python test_ms.py
use test_torch.py to test pytorch model
cd e2e_gdn_torch
python test_torch.py
comparision
Quality measurements on Kodak
MindSpore version, models trained on div2k
bpp |
PSNR |
MSSSIM |
run_time |
GPU Memory(MiB) |
lambda |
0.447 |
28.422 |
0.945 |
1.227 |
4004 |
lambda400 |
0.697 |
29.402 |
0.956 |
1.04 |
4004 |
lambda800 |
0.967 |
30.303 |
0.967 |
2.514 |
4004 |
lambda1500 |
1.241 |
30.635 |
0.973 |
1.074 |
4004 |
lambda3000 |
source
translated from pytorch
link:liujiaheng/iclr_17_compression: End-to-end optimized image compression (github.com)
citation
@article{balle2016end,
title={End-to-end optimized image compression},
author={Ball{\'e}, Johannes and Laparra, Valero and Simoncelli, Eero P},
journal={arXiv preprint arXiv:1611.01704},
year={2016}
}
contributors
name: Kaiyu Zheng