transform ¶
Classes¶
fastvideo.dataset.transform.CenterCropResizeVideo ¶
First use the short side for cropping length, center crop video, then resize to the specified size
Source code in fastvideo/dataset/transform.py
Methods:¶
fastvideo.dataset.transform.CenterCropResizeVideo.__call__ ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
clip | tensor | Video clip to be cropped. Size is (T, C, H, W) | required |
Returns: torch.tensor: scale resized / center cropped video clip. size is (T, C, crop_size, crop_size)
Source code in fastvideo/dataset/transform.py
fastvideo.dataset.transform.Normalize255 ¶
Convert tensor data type from uint8 to float, divide value by 255.0 and
fastvideo.dataset.transform.TemporalRandomCrop ¶
Functions:¶
fastvideo.dataset.transform.crop ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
clip | tensor | Video clip to be cropped. Size is (T, C, H, W) | required |
Source code in fastvideo/dataset/transform.py
fastvideo.dataset.transform.normalize_video ¶
Convert tensor data type from uint8 to float, divide value by 255.0 and permute the dimensions of clip tensor Args: clip (torch.tensor, dtype=torch.uint8): Size is (T, C, H, W) Return: clip (torch.tensor, dtype=torch.float): Size is (T, C, H, W)