This repository contains the code for reproducing the results with the training file, in the following paper:
Exploring Resolution Fields for Scalable Image Compression with Uncertainty Guidance
- Download CLIC2020 Dateset and place them in 'Dataset'.
- You can generate the patches using the patch generation file from Link.
- Downsample the training images to size HxW, 2Hx2W and 4Hx4W.
- Generate the tfrecord for spatial scalable.
python create_tfrecords.py --train_tfrecords ./xxx.tfrecords --input_image ./your_4Hx4W_image_folder, --input_image_half ./your_2Hx2W_image_folder, --input_image_quater ./your_4Hx4W_image_folder
-
Python==3.6.13
-
Tensorflow==1.15.0
If your machine has multiple GPUs, you can select which GPU you want to run on by setting the environment variable before the Python operation
CUDA_VISIBLE_DEVICES=0 (0, 1, 2, 3,...)
Before training, modify the arguments like train_dataset, checkpoint_dir, num_filter, and lambda.
python train_spaital.py
python train_quality.py
-
When running the
evaluate()
, the input image will be compressed into several bitstreams like: stream_B.tfci and stream_e1.tfci, it will also evaluate the bpp and PSNR (or MS-SSIM) of each layer. -
When running the
decompress()
the bitstreams can be decoded to images.
Before testing, modify the arguments like input_image, output_folder, checkpoint_dir, and num_filters.
python eval_spaital.py
python eval_quality.py
If you think it is useful for your reseach, please cite our paper.
@misc{zhang2023exploring,
title={Exploring Resolution Fields for Scalable Image Compression with Uncertainty Guidance},
author={Dongyi Zhang and Feng Li and Man Liu and Runmin Cong and Huihui Bai and Meng Wang and Yao Zhao},
year={2023},
eprint={2306.08941},
archivePrefix={arXiv},
primaryClass={eess.IV}
}
If you find any problem in the code and want to ask any questions, please send us an email dyzhang@bjtu.edu.cn