Skip to content

Commit d658944

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent 4ba3780 commit d658944

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

supervision/annotators/core.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from supervision.draw.color import Color, ColorPalette
1313
from supervision.draw.utils import draw_polygon
1414
from supervision.geometry.core import Position
15-
from supervision.utils.image import crop_image, resize_image, place_image
15+
from supervision.utils.image import crop_image, place_image, resize_image
1616

1717

1818
class BoundingBoxAnnotator(BaseAnnotator):
@@ -1796,23 +1796,17 @@ def annotate(
17961796
```
17971797
"""
17981798
crops = [
1799-
crop_image(image=scene, xyxy=xyxy)
1800-
for xyxy
1801-
in detections.xyxy.astype(int)
1799+
crop_image(image=scene, xyxy=xyxy) for xyxy in detections.xyxy.astype(int)
18021800
]
18031801
resized_crops = [
1804-
resize_image(image=crop, scale_factor=self.scale_factor)
1805-
for crop
1806-
in crops
1802+
resize_image(image=crop, scale_factor=self.scale_factor) for crop in crops
18071803
]
18081804
anchors = detections.get_anchors_coordinates(anchor=self.position).astype(int)
18091805

18101806
for resized_crop, anchor in zip(resized_crops, anchors):
18111807
crop_wh = resized_crop.shape[1], resized_crop.shape[0]
18121808
crop_anchor = self.calculate_crop_coordinates(
1813-
anchor=anchor,
1814-
crop_wh=crop_wh,
1815-
position=self.position
1809+
anchor=anchor, crop_wh=crop_wh, position=self.position
18161810
)
18171811
scene = place_image(scene=scene, image=resized_crop, anchor=crop_anchor)
18181812

0 commit comments

Comments
 (0)