cutcutcodec.core.analysis.video.complexity.utils.batched_frames

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.