Skip to content

ratnajitmukherjee/HDRVideoEvaluationFramework-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HDR Video Evaluation Framework (Python)

A Python port of the HDR Video Evaluation Framework, originally developed in MATLAB during PhD research at the University of Warwick.

Overview

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.

Features

  • 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

Installation

Requires Python 3.12+ and Poetry.

git clone https://github.com/ratnajitmukherjee/hdr-evaluation-framework-python
cd hdr-evaluation-framework-python
poetry install

External encoders (x264, x265, ffmpeg) must be installed separately and available on PATH.

Usage

Encode HDR frames to a compressed bitstream

# 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 22

Decode a bitstream back to HDR frames

hdr-decode --config configs/example_decode.yaml

# Or with flags
hdr-decode --input output.265 --aux /path/to/aux --method pq --output /path/to/decoded

Evaluate quality metrics

hdr-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.

Project Structure

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

License

BSD 3-Clause License. Copyright 2018–2025, Ratnajit Mukherjee.

About

Python port of the HDR Video Evaluation Framework (originally MATLAB, University of Warwick PhD research)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages