![]() |
Coretex
|
Public Member Functions | |
ImageDatasetClasses | generate (cls, Set[str] labels) |
![]() | |
Dict[str, Any] | encode (self) |
None | onDecode (self) |
Self | decode (cls, Dict[str, Any] encodedObject) |
Image Dataset class metadata Properties ---------- classIds : List[UUID] list of all uuids connected to this class label : str name of the class color : str color of the class
Definition at line 29 of file classes_format.py.
ImageDatasetClasses coretex.entities.annotation.image.classes_format.ImageDatasetClass.generate | ( | cls, | |
Set[str] | labels | ||
) |
Generates list of Coretex classes based on provided labels (class names) Parameters ---------- labels : Set[str] list of labels (class names) Returns ------- ImageDatasetClasses -> list of ImageDatasetClass (Coretex class metadata) objects Example ------- >>> from coretex import ImageDatasetClass \b >>> labels = {"car", "bicycle"} >>> imgDatasetClasses = ImageDatasetClass.generate(labels) >>> print(classes) [ ImageDatasetClass( classIds = [UUID("81add001-1c9c-4949-8b73-3599f1d0de9d")], name = "car", color = "#bcb86b" ), ImageDatasetClass( classIds = [UUID("d710019b-f28f-40ab-aa65-e13df949beff")], name = "bicycle", color = "#cbc66b" ) ]
Definition at line 69 of file classes_format.py.