Skip to content

Performs a quantitative study on the most recent image compression formats, for the context of medical imaging.

License

Notifications You must be signed in to change notification settings

Almeida-a/ic-encoders-eval

Repository files navigation

Image Compression Evaluation Pipeline

This is a set of scripts that perform a quantitative evaluation over the most recent image compression formats, such as Cloudinary's JPEG XL, Google's WebP and AOMediaCodec's AVIF, for the scope of medical imaging.

Table of contents

  1. About
  2. Usage Guide
    1. Setting up
      1. Hardware Requirements
      2. Dependencies
      3. Dataset
    2. Running
      1. Main Pipeline
      2. JPEG Pipeline
  3. Feedback
  4. Licence

About

Codecs Evaluation Pipeline

This project is aimed to evaluate the most recent image compression formats.

Usage Guide

Setting up

Hardware Requirements

Currently, this software only works on Linux machines that have the aforementioned codecs installed. See #set-up for how to set up your machine.

Dependencies

Ensure you have python3.10 installed, as well as the pip module.

Install the dicom toolkit software:

sudo apt install dcmtk

Install the required libraries to run the pipeline:

pip install -r requirements.txt
AVIF

First, install the rust toolkit with:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Secondly, install cavif-rs

cargo install cavif
JPEG XL

Install from source using:

sudo ./build_jxl.sh
WebP

Install through apt:

sudo apt install webp

Dataset

In order to run the program, you will need a set of dicom files to serve as your experiment dataset upon which the results will be based on. Copy them to the folder images/dataset_dicom.

Running

Main pipeline

To execute the main pipeline benchmark, run:

python3 dicom_parser.py  # pre-processing the dataset to (a)png image files
python3 procedure.py  # run encoders and captures metrics

Bear in mind that having a big dicom dataset can yield a long script execution time.

Two files procedure_results.{json,csv} are generated containing raw data with the benchmark results.

To generate the results in charts form, run:

python3 visualize_data.py

You can edit the script at the bottom in order to generate the results based on what you want to see.

JPEG Pipeline

To perform the benchmarking itself, run:

python3 jpeg_eval.py

Bear in mind that having a big dicom dataset can yield a long script execution time.

Two files procedure_results.{json,csv} are generated containing raw data with the benchmark results.

Feedback

If you find a bug or want to send feedback, please feel free to open an issue or pull request!

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Performs a quantitative study on the most recent image compression formats, for the context of medical imaging.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published