Skip to content

Context-Based Trit-Plane Coding for Progressive Image Compression, CVPR2023

License

Notifications You must be signed in to change notification settings

seungminjeon-github/CTC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CTC (CVPR 2023)

"Context-based Trit-Plane Coding for Progressive Image Compression," In CVPR 2023.

Seungmin Jeon, Kwang Pyo Choi, Youngo Park and Chang-Su Kim.

PyTorch-Based Official Code for CTC.

Requirements

  • python 3.9
  • pytorch 1.11.0 (cudatoolkit 11.0)
  • torchvision 0.12.0
  • CompressAI 1.2.1
  • Ubuntu 18.04 recommended

Installation

Download pre-trained model parameters on the root path.

Usage

Encoding

  $ python codec.py --mode enc --save-path {path} --input-file {input image file} --cuda

"--cuda" is optional.

For exasmple, command below

  $ python codec.py --mode enc --save-path results --input-file sample.png --cuda

generates binary files in "results/bits".

Decoding

  $ python codec.py --mode dec --save-path {path same with enc} --input-file {original image file} --recon-level {int} --cuda

"--input-file" is optional, used to calculate PSNR.

For example, command below

  $ python codec.py --mode dec --save-path results --input-file sample.png --recon-level 140 --cuda

prints metrics and saves reconstructed an image "results/recon/q0140.png".

Citation

Please cite the following paper when you use this repository. Thanks!

    @inproceedings{2023_CVPR_jeon,
        author    = {Jeon, Seungmin and Choi, Kwang Pyo and Park, Youngo and Kim, Chang-Su}, 
        title     = {Context-Based Trit-Plane Coding for Progressive Image Compression}, 
        booktitle = {{Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}},
        year      = {2023}
    }

License

See MIT License

About

Context-Based Trit-Plane Coding for Progressive Image Compression, CVPR2023

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages