MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / __init__

Method __init__

benchmark/autoshot_dataset.py:13–23  ·  view source on GitHub ↗
(self, dataset_dir: str)

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected