(self, path: str)
| 575 | return self._num_frames |
| 576 | |
| 577 | def video_open(self, path: str) -> Tuple[decord.VideoReader, int]: |
| 578 | if path not in self._video_map: |
| 579 | index = len(self._video_map) |
| 580 | vr = decord.VideoReader(path, ctx=decord.cpu(0)) |
| 581 | self._video_map[path] = (vr, index) |
| 582 | return self._video_map[path] |
| 583 | |
| 584 | def sample_frames(self, num_frames: int, vlen: int) -> List[int]: |
| 585 | acc_samples = min(num_frames, vlen) |