mosidi commited on
Commit
dc7aa17
·
1 Parent(s): 86adf98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -138,10 +138,11 @@ def inference(image_url, image, min_score):
138
  measurements = {}
139
 
140
  for ind,item_mask in enumerate(masks):
 
141
  if segmentation[1].any() and segmentation[0].any():
142
  # box=bbox[ind]
143
  # Get the true bounding box of the mask (not the same as the bbox prediction)
144
- segmentation = np.where(item_mask == True)
145
  x_min = int(np.min(segmentation[1]))
146
  x_max = int(np.max(segmentation[1]))
147
  y_min = int(np.min(segmentation[0]))
 
138
  measurements = {}
139
 
140
  for ind,item_mask in enumerate(masks):
141
+ segmentation = np.where(item_mask == True)
142
  if segmentation[1].any() and segmentation[0].any():
143
  # box=bbox[ind]
144
  # Get the true bounding box of the mask (not the same as the bbox prediction)
145
+
146
  x_min = int(np.min(segmentation[1]))
147
  x_max = int(np.max(segmentation[1]))
148
  y_min = int(np.min(segmentation[0]))