18 from pathlib
import Path
22 from .base
import BaseImageDataset
23 from ..local_dataset
import LocalDataset
24 from ...sample
import LocalImageSample
25 from ...annotation
import ImageDatasetClass, ImageDatasetClasses
28 class LocalImageDataset(BaseImageDataset[LocalImageSample], LocalDataset[LocalImageSample]):
31 Represents the Local Image Dataset class \n
32 Includes functionality for working with local Image Datasets
39 Image Dataset Classes object
41 path to classes.json file
44 def __init__(self, path: Path) ->
None:
45 super().__init__(path, LocalImageSample)
49 if self.classesPath.exists():
50 with open(path /
"classes.json")
as file:
51 value = json.load(file)
53 [ImageDatasetClass.decode(element)
for element
in value]