PyTorch native metrics library providing 400+ rigorously tested metrics across classification, regression, audio, image, text, and other ML domains
Specialized metrics for video quality assessment and evaluation, focusing on perceptual quality measures for video processing applications.
Advanced metrics for evaluating video quality (require optional dependencies).
class VideoMultiMethodAssessmentFusion(Metric):
def __init__(
self,
**kwargs
): ...import torch
from torchmetrics.video import VideoMultiMethodAssessmentFusion
# Video quality assessment with VMAF
try:
vmaf = VideoMultiMethodAssessmentFusion()
# Sample video tensors (batch, channels, time, height, width)
preds = torch.randint(0, 256, (1, 3, 30, 480, 640), dtype=torch.uint8) # 30 frames
target = torch.randint(0, 256, (1, 3, 30, 480, 640), dtype=torch.uint8)
# Compute VMAF score
vmaf_score = vmaf(preds, target)
print(f"VMAF Score: {vmaf_score:.4f}")
except ImportError:
print("VMAF requires the 'torch-vmaf' package")VideoTensor = Tensor # Shape: (batch, channels, time, height, width)Install with Tessl CLI
npx tessl i tessl/pypi-torchmetrics