(self, dataset_dir: str)
| 11 | """ |
| 12 | |
| 13 | def __init__(self, dataset_dir: str): |
| 14 | self._video_files = [ |
| 15 | file for file in sorted(glob.glob(os.path.join(dataset_dir, "videos", "*.mp4"))) |
| 16 | ] |
| 17 | self._scene_files = [ |
| 18 | file for file in sorted(glob.glob(os.path.join(dataset_dir, "fixed", "*.txt"))) |
| 19 | ] |
| 20 | assert len(self._video_files) == len(self._scene_files) |
| 21 | for video_file, scene_file in zip(self._video_files, self._scene_files, strict=True): |
| 22 | video_id = os.path.basename(video_file).replace("bbc_", "").split(".")[0] |
| 23 | scene_id = os.path.basename(scene_file).split("-")[0] |
| 24 | assert video_id == scene_id |
| 25 | |
| 26 | def __getitem__(self, index): |
| 27 | video_file = self._video_files[index] |
nothing calls this directly
no outgoing calls
no test coverage detected