![]() |
Coretex
|
Public Member Functions | |
Optional[ImageDatasetClass] | classById (self, UUID classId) |
Optional[ImageDatasetClass] | classByLabel (self, str label) |
Optional[int] | labelIdForClassId (self, UUID classId) |
Optional[int] | labelIdForClass (self, ImageDatasetClass clazz) |
None | exclude (self, List[str] excludedClasses) |
![]() | |
ImageDatasetClasses | generate (cls, Set[str] labels) |
![]() | |
Dict[str, Any] | encode (self) |
None | onDecode (self) |
Self | decode (cls, Dict[str, Any] encodedObject) |
List of Image Dataset class metadata Properties ---------- labels : List[str] list of the classes names
Definition at line 115 of file classes_format.py.
Optional[ImageDatasetClass] coretex.entities.annotation.image.classes_format.ImageDatasetClasses.classById | ( | self, | |
UUID | classId | ||
) |
Retrieves a Image dataset class based on provided ID Parameters ---------- classID : UUID id of class Returns ------- Optional[ImageDatasetClasses] -> fetched class if provided ID is found in list of class IDs, None otherwise Examples -------- >>> from coretex import ImageDataset \b >>> dataset = ImageDataset.fetchById(1023) >>> classObj = dataset.classes.classById(UUID("d710019b-f28f-40ab-aa65-e13df949beff")) \b >>> if classObj is not None: print(classObj.classIds) print(classObj.label) print(classObj.color) UUID("d710019b-f28f-40ab-aa65-e13df949beff") "bicycle" "#d06df5"
Definition at line 133 of file classes_format.py.
Optional[ImageDatasetClass] coretex.entities.annotation.image.classes_format.ImageDatasetClasses.classByLabel | ( | self, | |
str | label | ||
) |
Retrieves a Image dataset class based on provided label Parameters ---------- label : str name of class Returns ------- Optional[ImageDatasetClasses] -> fetched class if provided label is found in list of class labels, None otherwise
Definition at line 170 of file classes_format.py.
None coretex.entities.annotation.image.classes_format.ImageDatasetClasses.exclude | ( | self, | |
List[str] | excludedClasses | ||
) |
Excludes classes that are provided in excludedClasses list Parameters ---------- excludedClasses : List[str] list of classes that will be excluded
Definition at line 251 of file classes_format.py.
Optional[int] coretex.entities.annotation.image.classes_format.ImageDatasetClasses.labelIdForClass | ( | self, | |
ImageDatasetClass | clazz | ||
) |
Retrieves a label ID based on provided ImageDatasetClass object Parameters ---------- clazz : ImageDatasetClass Image Dataset class metadata object Returns ------- Optional[int] -> label ID if provided class exists in a list of ImageDataset classes otherwise None Example ------- >>> from coretex import ImageDatasetClass \b >>> dataset = ImageDataset.fetchById(1023) >>> labelId = dataset.classes.labelIdForClass(dataset.classes[0]) >>> print(labelId) 0
Definition at line 225 of file classes_format.py.
Optional[int] coretex.entities.annotation.image.classes_format.ImageDatasetClasses.labelIdForClassId | ( | self, | |
UUID | classId | ||
) |
Retrieves a label ID based on provided class ID Parameters ---------- classId : UUID id of class Returns ------- Optional[int] -> label ID if provided class ID is found in list of class IDs, None otherwise Example ------- >>> from coretex import ImageDataset \b >>> dataset = ImageDataset.fetchById(1023) >>> labelId = dataset.classes.labelIdForClassId(UUID("d710019b-f28f-40ab-aa65-e13df949beff")) >>> print(labelId) 1
Definition at line 191 of file classes_format.py.