(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, "annotations", "*.txt"))) |
| 19 | ] |
| 20 | for video_file, scene_file in zip(self._video_files, self._scene_files, strict=True): |
| 21 | video_id = os.path.basename(video_file).split(".")[0] |
| 22 | scene_id = os.path.basename(scene_file).split(".")[0] |
| 23 | assert video_id == scene_id |
| 24 | |
| 25 | def __getitem__(self, index): |
| 26 | video_file = self._video_files[index] |
nothing calls this directly
no outgoing calls
no test coverage detected