simulation.utils.machine_learning.data.labeled_dataset module¶
Reference¶
-
class
LabeledDataset(transform_properties: Dict[str, Any] = <factory>, attributes: Optional[Sequence[str]] = None, classes: Dict[int, str] = <factory>, labels: Dict[str, List[Sequence[Any]]] = <factory>, _base_path: Optional[str] = None)[source]¶ Bases:
Generic[torch.utils.data.dataset.T_co]Dataset of images with labels.
-
attributes: Sequence[str] = None¶ Description of what each label means.
Similar to headers in a table.
-
classes: Dict[int, str]¶ Description of what the class ids represent.
-
labels: Dict[str, List[Sequence[Any]]]¶ Collection of all labels structured as a dictionary.
-
_base_path: str = None¶ Path to the root of the dataset.
Only needs to be set if the dataset is used to load data.
-
property
available_files¶
-
append_label(key: str, label: Any)[source]¶ Add a new label to the dataset.
A single image (or any abstract object) can have many labels.
-