robotic_sdk.utils package
Submodules
robotic_sdk.utils.bboxes module
- class robotic_sdk.utils.bboxes.BoundingBox(xmin: int, ymin: int, xmax: int, ymax: int)
Bases:
object
A class to represent a bounding box.
- xmin
The minimum x-coordinate of the bounding box.
- Type:
int
- ymin
The minimum y-coordinate of the bounding box.
- Type:
int
- xmax
The maximum x-coordinate of the bounding box.
- Type:
int
- ymax
The maximum y-coordinate of the bounding box.
- Type:
int
- __init__(xmin: int, ymin: int, xmax: int, ymax: int) None
- property area: int
Calculate the area of the bounding box.
- Returns:
The area of the bounding box.
- Return type:
int
- xmax: int
- xmin: int
- property xyxy: List[float]
Get the bounding box coordinates in [xmin, ymin, xmax, ymax] format.
- Returns:
The coordinates of the bounding box.
- Return type:
List[float]
- ymax: int
- ymin: int
- class robotic_sdk.utils.bboxes.DetectionResult(score: float, label: str, box: BoundingBox, mask: array | None = None)
Bases:
object
A class to represent a detection result.
- score
The confidence score of the detection.
- Type:
float
- label
The label of the detected object.
- Type:
str
- box
The bounding box of the detected object.
- Type:
- mask
The mask of the detected object, if available.
- Type:
Optional[np.array]
- __init__(score: float, label: str, box: BoundingBox, mask: array | None = None) None
- box: BoundingBox
- classmethod from_dict(detection_dict: Dict) DetectionResult
Create a DetectionResult instance from a dictionary.
- Parameters:
detection_dict (Dict) – A dictionary containing detection result data.
- Returns:
An instance of DetectionResult.
- Return type:
- label: str
- mask: array | None = None
- score: float
robotic_sdk.utils.helpers module
- robotic_sdk.utils.helpers.read_yaml_config(path: Path) dict
Reads configuration yaml files and returns them as a dictionary.
- Parameters:
path (Path) – Path to yaml file.
- Returns:
Configuration file as a dictionary.
- Return type:
dict
- Raises:
Exception – If the path to the configuration file doesn’t exist.
robotic_sdk.utils.logging_config module
- robotic_sdk.utils.logging_config.setup_logging()
This function sets up logging configuration for the application.