Код: Выделить всё
@pipeline_def
def video_read_pipe():
video = fn.readers.video(
filenames=[vid_name],
name="video reader",
sequence_length=num_frames,
file_list_include_preceding_frame=True,
device="gpu",
seed=42,
#stride=10,
read_ahead=False,
random_shuffle=False,
skip_vfr_check=True
)
return video
batch_size = 1
pipe = video_read_pipe(batch_size=batch_size, device_id=1, num_threads=4)
pipe.build()
dali_iter = DALIGenericIterator([pipe], ["data"], reader_name="video reader")
Код: Выделить всё
pipe.reader_meta()Подробнее здесь: https://stackoverflow.com/questions/788 ... vidia-dali