fix(pre_commit): 🎨 auto format pre-commit hooks
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user