quality.heatmap
- class HeatmapFromVMAFReports(path, lightfield, tool_name, target_rate, distortion_name, distortion_unit, title, scan_order=<function get_serpentine_scan_list>, configuration=None)[source]
Bases:
objectBuilds heatmap data from VMAF reports.
- Parameters:
path (str | Path)
lightfield (Any)
tool_name (str)
target_rate (float)
distortion_name (str)
distortion_unit (str)
title (str)
scan_order (Callable)
configuration (Any | None)
- __init__(path, lightfield, tool_name, target_rate, distortion_name, distortion_unit, title, scan_order=<function get_serpentine_scan_list>, configuration=None)[source]
Initializes HeatmapFromVMAFReports by reading reports from path.
- Parameters:
path (Union[str, Path]) – Path to report directory
lightfield (Any) – Lightfield data
tool_name (str) – Name of the quality tool
target_rate (float) – Target bits per pixel
distortion_name (str) – Name of the distortion metric
distortion_unit (str) – Unit for the distortion metric
title (str) – Plot title
scan_order (Callable) – Scan order function, defaults to get_serpentine_scan_list
configuration (Optional[Any]) – Optional configuration, defaults to None
- Returns:
None
- Return type:
None
- static read_reports(path, lightfield, tool_name, target_rate, distortion_name, scan_order=<function get_serpentine_scan_list>, configuration=None)[source]
Reads VMAF reports and returns metric values as a 2D array.
- Parameters:
path (Union[str, Path]) – Path to report directory
lightfield (Any) – Lightfield data
tool_name (str) – Name of the quality tool
target_rate (float) – Target bits per pixel
distortion_name (str) – Name of the distortion metric
scan_order (Callable) – Scan order function, defaults to get_serpentine_scan_list
configuration (Optional[Any]) – Optional configuration, defaults to None
- Returns:
2D array of metric values (transposed)
- Return type:
Any
- class HeatmapMatplotlib(path, lightfield, tool_name, target_rate, distortion_name, distortion_unit, title, scan_order=<function get_serpentine_scan_list>, configuration=None)[source]
Bases:
objectPlots heatmaps using matplotlib from VMAF reports.
- Parameters:
path (str | Path)
lightfield (Any)
tool_name (str)
target_rate (float)
distortion_name (str)
distortion_unit (str)
title (str)
scan_order (Callable)
configuration (Any | None)
- __init__(path, lightfield, tool_name, target_rate, distortion_name, distortion_unit, title, scan_order=<function get_serpentine_scan_list>, configuration=None)[source]
Initializes HeatmapMatplotlib with report path and configuration.
- Parameters:
path (Union[str, Path]) – Path to report directory
lightfield (Any) – Lightfield data
tool_name (str) – Name of the quality tool
target_rate (float) – Target bits per pixel
distortion_name (str) – Name of the distortion metric
distortion_unit (str) – Unit for the distortion metric
title (str) – Plot title
scan_order (Callable) – Scan order function, defaults to get_serpentine_scan_list
configuration (Optional[Any]) – Optional configuration, defaults to None
- Returns:
None
- Return type:
None
- plot(show_values=True, filename=None, codec_name=None, cmap='viridis')[source]
Plots the heatmap, optionally saving to file.
- Parameters:
show_values (bool) – Whether to overlay metric values on the heatmap, defaults to True
filename (Optional[Union[str, Path]]) – Optional path to save the plot, defaults to None
codec_name (Optional[str]) – Optional codec name for the title, defaults to None
cmap (str) – Colormap name, defaults to “viridis”
- Returns:
None
- Return type:
None