diff --git a/supervision/annotators/core.py b/supervision/annotators/core.py index 254c55e0..b78b3b17 100644 --- a/supervision/annotators/core.py +++ b/supervision/annotators/core.py @@ -1375,10 +1375,12 @@ class LabelAnnotator(_BaseLabelAnnotator): position=self.text_anchor, ) - label_properties.append([ - *text_background_xyxy, - total_height, - ]) + label_properties.append( + [ + *text_background_xyxy, + total_height, + ] + ) return np.array(label_properties).reshape(-1, 5) def _draw_labels( @@ -1704,7 +1706,6 @@ class RichLabelAnnotator(_BaseLabelAnnotator): return load_default_font(font_size) - class IconAnnotator(BaseAnnotator): """ A class for drawing an icon on an image, using provided detections. diff --git a/supervision/detection/utils.py b/supervision/detection/utils.py index d2191c9f..40275831 100644 --- a/supervision/detection/utils.py +++ b/supervision/detection/utils.py @@ -1214,10 +1214,12 @@ def cross_product(anchors: np.ndarray, vector: Vector) -> np.ndarray: Returns: Array of cross products of shape (number of anchors, detections) """ - vector_at_zero = np.array([ - vector.end.x - vector.start.x, - vector.end.y - vector.start.y, - ]) + vector_at_zero = np.array( + [ + vector.end.x - vector.start.x, + vector.end.y - vector.start.y, + ] + ) vector_start = np.array([vector.start.x, vector.start.y]) return np.cross(vector_at_zero, anchors - vector_start)