MCPcopy Create free account
hub / github.com/NVIDIA/DALI / vid_pipeline

Function vid_pipeline

dali/test/python/sequences_test_utils.py:452–470  ·  view source on GitHub ↗
(num_frames, width, height, seq_layout)

Source from the content-addressed store, hash-verified

450
451@pipeline_def
452def vid_pipeline(num_frames, width, height, seq_layout):
453 vid, _ = fn.readers.video_resize(
454 filenames=[vid_file],
455 labels=[],
456 name="video reader",
457 sequence_length=num_frames,
458 file_list_include_preceding_frame=True,
459 device="gpu",
460 seed=42,
461 resize_x=width,
462 resize_y=height,
463 )
464 if seq_layout == "FCHW":
465 vid = fn.transpose(vid, perm=[0, 3, 1, 2])
466 elif seq_layout == "CFHW":
467 vid = fn.transpose(vid, perm=[3, 0, 1, 2])
468 else:
469 assert seq_layout == "FHWC"
470 return vid
471
472
473def vid_source(batch_size, num_batches, num_frames, width, height, seq_layout):

Callers 1

vid_sourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected