Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
included detection bboxes in label collision check
Dillon DuPont1e7d6795060a
diff --git a/libs/som/som/visualization.py b/libs/som/som/visualization.pyindex 4212379c36..5c270c2825 100644--- a/libs/som/som/visualization.py+++ b/libs/som/som/visualization.py@@ -112,10 +112,18 @@ class BoxAnnotator:# Keep track of used label areas to check for collisionsused_areas = []- # Store label information for second pass+ # Store label information for third passlabels_to_draw = []- # First pass: Draw all bounding boxes+ # First pass: Initialize used_areas with all bounding boxes+ for detection in detections:+ box = detection["bbox"]+ x1, y1, x2, y2 = [+ int(coord * dim) for coord, dim in zip(box, [image.width, image.height] * 2)+ ]+ used_areas.append((x1, y1, x2, y2))++ # Second pass: Draw all bounding boxesfor idx, detection in enumerate(detections, 1):# Get box coordinatesbox = detection["bbox"]@@ -233,7 +241,7 @@ class BoxAnnotator:})- # Second pass: Draw all labels on top+ # Third pass: Draw all labels on topfor label_info in labels_to_draw:# Draw background box with white outlinedraw.rectangle(