@@ -105,25 +105,12 @@ class IndexBasedSamplerArgs(SamplerArgs):
105
105
sample_step : int = 1
106
106
107
107
108
- class VideoClipSampler (nn .Module ):
108
+ class DEPRECATED_VideoClipSampler (nn .Module ):
109
109
"""
110
- VideoClipSampler will do video clip sampling with given video args and sampler args.
111
- The video args contains video related information, frames_per_clip, dimensions etc.
112
- The sampler args can be either time-based or index-based, it will be used to decide clip start time pts or index.
113
- ClipSampling support, random, uniform, periodic, target, keyframe sampling etc.
110
+ DEPRECATED: Do not use. The supported samplers are in `torchcodec.samplers`. See:
114
111
115
- Args:
116
- video_args (`VideoArgs`): The video args
117
- sampler_args (`SamplerArgs`): The sampler args. Can be TimeBasedSamplerArgs or IndexBasedSamplerArgs
118
- decoder_args (`DecoderArgs`): Decoder args contain value needs for decoder, for example, thread count
119
-
120
- Example:
121
- >>> video_args = VideoArgs(desired_width=224, desired_height=224)
122
- >>> time_based_sampler_args = TimeBasedSamplerArgs(sampler_type="random", clips_per_video=1, frames_per_clip=4)
123
- >>> video_decoder_args = DecoderArgs(num_threads=1)
124
- >>> video_clip_sampler = VideoClipSampler(video_args, time_based_sampler_args, decoder_args)
125
- >>> clips = video_clip_sampler(video_data)
126
- clips now contains a list of clip, where clip is a list of frame tensors, each tensor represents a frame image.
112
+ * https://docs.pytorch.org/torchcodec/stable/api_ref_torchcodec.html
113
+ * https://docs.pytorch.org/torchcodec/stable/generated_examples/decoding/sampling.html
127
114
"""
128
115
129
116
def __init__ (
0 commit comments