Saving state before replacing annotation tool
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user