diff --git a/common/research_common/dataset/dataset.py b/common/research_common/dataset/dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..40059b5fbcdb61b5bc51d465936bb41d8ca2393e --- /dev/null +++ b/common/research_common/dataset/dataset.py @@ -0,0 +1,26 @@ +from dataclasses import dataclass +from pathlib import Path +from typing import Iterable + + +@dataclass +class Dataset: + + dataset_path: Path + dataset_name: str + + @property + def images_dir_path(self) -> Path: + return self.dataset_path / "image" + + @property + def annotations_dir_path(self) -> Path: + return self.dataset_path / "image_annotation" + + @property + def image_paths(self) -> Iterable[Path]: + return self.images_dir_path.glob("*.jpg") + + @property + def annotation_paths(self) -> Iterable[Path]: + return self.annotations_dir_path.glob("*.xml")