Astridkraft commited on
Commit
d4cdce6
·
verified ·
1 Parent(s): 266afae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- # 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
@@ -257,6 +257,7 @@ def scale_image_and_mask_together(image, mask, target_size=512, bbox_coords=None
257
  'scale_factor': scale,
258
  'target_size': target_size,
259
  'original_bbox': bbox_coords,
 
260
  'mode': mode
261
  }
262
 
 
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 berechnet.
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
 
257
  'scale_factor': scale,
258
  'target_size': target_size,
259
  'original_bbox': bbox_coords,
260
+ 'scaled_bbox': scaled_bbox,
261
  'mode': mode
262
  }
263