MCPcopy Index your code
hub / github.com/Vchitect/Latte / sample_frames

Function sample_frames

tools/utils/layers.py:377–383  ·  view source on GitHub ↗
(cfg: Dict, total_video_len: int, **kwargs)

Source from the content-addressed store, hash-verified

375#----------------------------------------------------------------------------
376
377def sample_frames(cfg: Dict, total_video_len: int, **kwargs) -> np.ndarray:
378 if cfg['type'] == 'random':
379 return random_frame_sampling(cfg, total_video_len, **kwargs)
380 elif cfg['type'] == 'uniform':
381 return uniform_frame_sampling(cfg, total_video_len, **kwargs)
382 else:
383 raise NotImplementedError
384
385#----------------------------------------------------------------------------
386

Callers 1

_load_raw_framesMethod · 0.90

Calls 2

random_frame_samplingFunction · 0.85
uniform_frame_samplingFunction · 0.85

Tested by

no test coverage detected