Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1006,7 +1006,7 @@ def predict_with_paper(image, paper_size, offset, offset_unit, finger_clearance=
|
|
1006 |
objects_mask = cv2.morphologyEx(full_mask, cv2.MORPH_OPEN, kernel)
|
1007 |
|
1008 |
# Resize mask to match cropped region and place back in original image space
|
1009 |
-
full_mask = np.zeros((
|
1010 |
x_min, y_min = crop_offset # Use crop_offset to ensure defined variables
|
1011 |
if cropped_image.shape[:2] != processed_size:
|
1012 |
resized_mask = cv2.resize(objects_mask, (cropped_image.shape[1], cropped_image.shape[0]))
|
|
|
1006 |
objects_mask = cv2.morphologyEx(full_mask, cv2.MORPH_OPEN, kernel)
|
1007 |
|
1008 |
# Resize mask to match cropped region and place back in original image space
|
1009 |
+
full_mask = np.zeros((image.shape[0], image.shape[1]), dtype=np.uint8)
|
1010 |
x_min, y_min = crop_offset # Use crop_offset to ensure defined variables
|
1011 |
if cropped_image.shape[:2] != processed_size:
|
1012 |
resized_mask = cv2.resize(objects_mask, (cropped_image.shape[1], cropped_image.shape[0]))
|