Guill-Bla commited on
Commit
3e4ce08
·
verified ·
1 Parent(s): 4b9ac2a

Update tasks/image.py

Browse files
Files changed (1) hide show
  1. tasks/image.py +1 -1
tasks/image.py CHANGED
@@ -178,7 +178,7 @@ async def evaluate_image(request: ImageEvaluationRequest):
178
  # Threshold and process the segmentation mask
179
  probabilities = torch.sigmoid(logits)
180
  predicted_mask = (probabilities[0, 1] > 0.30).cpu().numpy().astype(np.uint8)
181
- predicted_mask_resized = cv2.resize(predicted_mask, original_shape[::-1], interpolation=cv2.INTER_NEAREST)
182
 
183
  # Extract bounding boxes
184
  predicted_boxes = get_bounding_boxes_from_mask(predicted_mask_resized)
 
178
  # Threshold and process the segmentation mask
179
  probabilities = torch.sigmoid(logits)
180
  predicted_mask = (probabilities[0, 1] > 0.30).cpu().numpy().astype(np.uint8)
181
+ predicted_mask_resized = cv2.resize(predicted_mask, (512,512), interpolation=cv2.INTER_NEAREST)
182
 
183
  # Extract bounding boxes
184
  predicted_boxes = get_bounding_boxes_from_mask(predicted_mask_resized)