A Python port of the HDR Video Evaluation Framework, originally developed in MATLAB during PhD research at the University of Warwick.
This framework provides a complete pipeline for evaluating HDR (High Dynamic Range) video compression methods. It supports multiple HDR transfer-function methods, codec integration (x264/x265), and a comprehensive set of perceptual quality metrics.
- Multiple HDR methods: PQ (ITU-R BT.2100), HLG (Hybrid Log-Gamma), HDRV, Fraunhofer, Gamma, GoHDR, HDR-JPEG, HDR-MPEG, PQ-IPT, Rate-Distortion
- Codec support: x264, x265 via ffmpeg
- Quality metrics: PSNR, Log-PSNR, SSIM, PU2-PSNR, PU2-SSIM, Weber RMSE, HDR-VDP
- CLI-driven: Three top-level commands for encode, decode, and evaluate
- Config-file or flag driven: Use YAML config files or pass flags directly
Requires Python 3.12+ and Poetry.
git clone https://github.com/ratnajitmukherjee/hdr-evaluation-framework-python
cd hdr-evaluation-framework-python
poetry installExternal encoders (x264, x265, ffmpeg) must be installed separately and available on PATH.
# Using a config file
hdr-encode --config configs/example_encode.yaml
# Using CLI flags directly
hdr-encode --input /path/to/exr_frames --method pq --output /path/to/output --qp 22hdr-decode --config configs/example_decode.yaml
# Or with flags
hdr-decode --input output.265 --aux /path/to/aux --method pq --output /path/to/decodedhdr-evaluate --config configs/example_evaluate.yaml
# Or with flags
hdr-evaluate --original /path/to/original --decoded /path/to/decoded --output results/Results are printed to the terminal, saved as CSV, and plotted as PNG figures.
src/hdr_framework/
├── cli/ # argparse entry points (encode, decode, evaluate)
├── methods/ # HDR transfer-function methods (one subpackage each)
│ ├── base.py # Abstract base class
│ ├── pq/
│ ├── bbc_hlg/
│ └── ...
├── metrics/ # Quality metric implementations
├── encoders/ # x264/x265/ffmpeg subprocess wrappers
├── util/ # Shared utilities (luminance, CSF, image I/O)
├── space_transform/ # Colour space conversions (sRGB↔XYZ, YUV, LUV, IPT)
└── results/ # Matplotlib plotting and CSV export
BSD 3-Clause License. Copyright 2018–2025, Ratnajit Mukherjee.