Unverified Commit 56d4078e authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Add docs for UniformTemporalSubsample (#7325)


Co-authored-by: default avatarPhilip Meier <github.pmeier@posteo.de>
Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
parent 877ffd9f
......@@ -192,6 +192,7 @@ Miscellaneous
v2.Lambda
v2.SanitizeBoundingBox
v2.ClampBoundingBox
v2.UniformTemporalSubsample
.. _conversion_transforms:
......
......@@ -7,6 +7,19 @@ from torchvision.transforms.v2.utils import is_simple_tensor
class UniformTemporalSubsample(Transform):
"""[BETA] Uniformly subsample ``num_samples`` indices from the temporal dimension of the video.
.. betastatus:: UniformTemporalSubsample transform
Videos are expected to be of shape ``[..., T, C, H, W]`` where ``T`` denotes the temporal dimension.
When ``num_samples`` is larger than the size of temporal dimension of the video, it
will sample frames based on nearest neighbor interpolation.
Args:
num_samples (int): The number of equispaced samples to be selected
"""
_transformed_types = (is_simple_tensor, datapoints.Video)
def __init__(self, num_samples: int):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment