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.
This project is aimed to evaluate the most recent image compression formats.
Currently, this software only works on Linux machines that have the aforementioned codecs installed. See #set-up for how to set up your machine.
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
First, install the rust toolkit with:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Secondly, install cavif-rs
cargo install cavif
Install from source using:
sudo ./build_jxl.sh
Install through apt:
sudo apt install webp
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
.
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.
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.
If you find a bug or want to send feedback, please feel free to open an issue or pull request!
This project is licensed under the MIT License - see the LICENSE.md file for details.