lp-compression

Lp-compression

A Python-based compression pipeline for images/videos & 3D videos that also evaluates the reconstruction quality using PSNR and other metrics.


Contents


License

The project is licensed under the MIT License.


Overview

This project implements a custom compression pipeline for image, video, and 3D video data.

The method compresses data whilst preserving analytical structure. This allows one to compute quantities such as gradients and higher-order derivatives directly from the compressed representation.

Although the current implementation supports images, videos, and 3D videos, the pipeline is designed to be generalizable to higher-dimensional data. In principle, it may be applicable to difficult-to-compress scientific datasets such as protein–protein interaction data.

Note: This extension is not yet implemented and is planned for a future phase of the project.


Features


Team and Support

We deeply acknowledge:

and the support and resources provided by the Center for Advanced Systems Understanding (Helmholtz-Zentrum Dresden-Rossendorf) where the development of this project took place.


Citation

The images we used in this project are from the TESTIMAGES dataset.

Images used:

** Related references **

Videos used:

** Related CTC references **

For more information on the theory:


Installation

This project uses Conda for environment setup and management, and requires Jupyter Notebook. Both jupyter and ipykernel are installed automatically when creating the environment. The only additional step is to register the environment as a Jupyter kernel.

  1. Clone the repository

     git clone https://github.com/scott-frowiss/lp-compression.git
     cd lp-compression
    
  2. Create and activate the environment

     conda env create --file=environment.yaml
     conda activate lp-compression
    
  3. Register the kernel

     python -m ipykernel install --user --name lp-compression --display-name "Python (lp-compression)"
    

    After this step, the kernel “Python (lp-compression)” will be available in Jupyter.

  4. Launch Jupyter Notebook

     jupyter notebook
    

    Alternatively:

     jupyter lab
    
  5. Verify the setup (optional, but recommended)

    Open any notebook and make sure the selected kernel is:

    Python (lp-compression)


Tutorial

The project consists of core Python (.py) scripts, and example (.ipynb) notebooks. The core scripts are necessary for proper project function, and the example notebooks are where the actual compression and reconstruction are done.

See the full tutorial index here: Tutorial Overview