Skip to content

ds-kiel/ProgDTD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProgDTD: Progressive Learned Image Compression with Double-Tail-Drop Training (CVPRW-2023)

Welcome to the ProgDTD repository! This repository contains the code for reproducing the results presented in the paper titled "ProgDTD: Progressive Learned Image Compression with Double-Tail-Drop Training (CVPRW-2023)."

About ProgDTD

ProgDTD is based on the observation that the information stored within the bottleneck of a compression model often varies in importance. To achieve progressive compression, ProgDTD modifies the training process to prioritize and store data in the bottleneck according to its importance. This allows us to transmit data in the order of its sorted index which results a progressive compression model. Key features of ProgDTD include:

  • Designed for CNN-based learned image compression models.
  • No need for additional parameters.
  • Customizable range of progressiveness.

In our experiments, we applied ProgDTD to the hyperprior model, a commonly used structure in learned image compression and used this as our baseline code.

Installation Instructions

Follow these instructions to set up the required Python environment for running ProgDTD. Make sure you have the following prerequisites installed on your system:

  • Python (Python 3.x recommended)
  • pip (Python package manager)
  • virtualenv (Python environment creator)

Installation

  1. Clone this Git repository to your local machine using the following command:

    git clone https://github.com/ds-kiel/ProgDTD
    cd ProgDTD
  2. Create a virtual Python environment to isolate the project dependencies. You can do this using venv if you're using Python 3.3 or newer, or virtualenv if you're using an older version of Python. Replace <env_name> with your preferred environment name:

    virtualenv progdtd
    source progdtd/bin/activate
  3. Install the necessary Python packages by running:

    pip install -r req.txt

Usage

Train from Scratch

To train a model from scratch, execute the following command:

python train.py

Trained models

You can download the pre-trained models here. In this folder, there are 6 models that have been trained with different Lambdas and progressiveness ranges.

Evaluation on the KODAK Dataset

To evaluate the model on the KODAK dataset, run:

python val.py

Compression Function

If you want to use ProgDTD compression function in your own code, you can import it as follows:

from val import ProgDTD

bpp, psnr, msssim, ssim = ProgDTD(
    model_path,  # Trained model path
    p,  # Latent usage percentage
    Lambda,  # Hyperparameter
    dataset_path  # Validation folder path (images should be 512x512)
)

Results on KODAK

Feel free to explore and experiment with ProgDTD to enhance your image compression tasks with progressive capabilities. If you have any questions or encounter issues, please refer to the documentation or reach out to the repository's maintainers for assistance.

@InProceedings{Hojjat_2023_CVPR,
    author    = {Hojjat, Ali and Haberer, Janek and Landsiedel, Olaf},
    title     = {ProgDTD: Progressive Learned Image Compression With Double-Tail-Drop Training},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
    month     = {June},
    year      = {2023},
    pages     = {1130-1139}
}

About

ProgDTD: Progressive Learned Image Compression with Double-Tail-Drop Training

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages