cutcutcodec.core.analysis.video.complexity.utils

Helper for metrics.

Functions

batched_frames(func)

Decorate to vectorize the metrics.

Details

cutcutcodec.core.analysis.video.complexity.utils.batched_frames(func: callable) callable[source]

Decorate to vectorize the metrics.

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