Coder Social home page Coder Social logo

almeida-a / ic-encoders-eval Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 107 KB

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

License: MIT License

Python 99.02% Shell 0.98%
avif benchmarking dicom image-compression jpegxl medical-imaging python python310 webp

ic-encoders-eval's Introduction

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.

ic-encoders-eval's People

Contributors

almeida-a avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.