cutcutcodec.core.analysis.video.quality.utils

Helper for metrics.

Functions

batched_comparative_frames(func)

Decorate to vectorize the metrics.

batched_single_frames(func)

Decorate to vectorize the metrics.

Details

cutcutcodec.core.analysis.video.quality.utils.batched_comparative_frames(func: callable) callable[source]

Decorate to vectorize the metrics.

The signature of the metric has to be: metric(dis: torch.Tensor, ref: torch.Tensor, *args, **kwargs) -> torch.Tensor With ref.shape == dis.shape == (batch, height, width, channels). The returned type is based on dis parameter.

cutcutcodec.core.analysis.video.quality.utils.batched_single_frames(func: callable) callable[source]

Decorate to vectorize the metrics.

The signature of the metric has to be: metric(dis: torch.Tensor, *args, **kwargs) -> torch.Tensor With dis.shape == (batch, 5, height, width, 3). The returned type is based on dis parameter.