segmentation #1

Merged
martin merged 13 commits from segmentation into main 2025-12-10 12:08:54 +02:00
Showing only changes of commit 73cb698488 - Show all commits

View File

@@ -495,7 +495,7 @@ class AnnotationCanvasWidget(QWidget):
objects = find_objects(labels)
w, h = arr.shape
bounding_boxes = [
[obj[0].start / w, obj[1].start / h, obj[0].stop / w, obj[1].stop / h]
[obj[1].start / h, obj[0].start / w, obj[1].stop / h, obj[0].stop / w]
for obj in objects
]
@@ -607,7 +607,7 @@ class AnnotationCanvasWidget(QWidget):
img_width = self.original_pixmap.width()
img_height = self.original_pixmap.height()
y_min_norm, x_min_norm, y_max_norm, x_max_norm = bbox
x_min_norm, y_min_norm, x_max_norm, y_max_norm = bbox
x_min = int(x_min_norm * img_width)
y_min = int(y_min_norm * img_height)
x_max = int(x_max_norm * img_width)