Update app.py
Browse files
app.py
CHANGED
|
@@ -233,7 +233,7 @@ def scale_image_and_mask_together(image, mask, target_size=512, bbox_coords=None
|
|
| 233 |
# in das Graustufenbild eingefügt. Das Padding ergibt sich aus dem Graustufenbild!
|
| 234 |
padded_mask.paste(scaled_mask, (x_offset, y_offset))
|
| 235 |
|
| 236 |
-
#
|
| 237 |
scaled_bbox = None
|
| 238 |
if bbox_coords and all(c is not None for c in bbox_coords):
|
| 239 |
x1, y1, x2, y2 = bbox_coords
|
|
|
|
| 233 |
# in das Graustufenbild eingefügt. Das Padding ergibt sich aus dem Graustufenbild!
|
| 234 |
padded_mask.paste(scaled_mask, (x_offset, y_offset))
|
| 235 |
|
| 236 |
+
# hiermit wird die (transformierte BBox)= skalierte BBox + Padding
|
| 237 |
scaled_bbox = None
|
| 238 |
if bbox_coords and all(c is not None for c in bbox_coords):
|
| 239 |
x1, y1, x2, y2 = bbox_coords
|