Module: tfm.vision.preprocess_ops_3d

Utils for processing video dataset features.

Functions

crop_image(...): Crops the image sequence of images.

decode_image(...): Decodes PNG or JPEG raw bytes string into a RGB uint8 Tensor.

decode_jpeg(...): Decodes JPEG raw bytes string into a RGB uint8 Tensor.

normalize_image(...): Normalizes images.

random_crop_resize(...): First crops clip with jittering and then resizes to (output_h, output_w).

random_flip_left_right(...): Flips all the frames with a probability of 50%.

resize_smallest(...): Resizes frames so that min(height, width) is equal to min_resize.

sample_linspace_sequence(...): Samples num_windows segments from sequence with linearly spaced offsets.

sample_segment_sequence(...): Samples a single segment of size num_frames from a given sequence.

sample_sequence(...): Samples a single segment of size num_steps from a given sequence.