Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -378,7 +378,7 @@ def predict(image, offset_inches):
|
|
378 |
objects_mask = resize_img(
|
379 |
objects_mask, (shrunked_img.shape[1], shrunked_img.shape[0])
|
380 |
)
|
381 |
-
offset_pixels = offset_inches / scaling_factor
|
382 |
dilated_mask = cv2.dilate(
|
383 |
objects_mask, np.ones((int(offset_pixels), int(offset_pixels)), np.uint8)
|
384 |
)
|
|
|
378 |
objects_mask = resize_img(
|
379 |
objects_mask, (shrunked_img.shape[1], shrunked_img.shape[0])
|
380 |
)
|
381 |
+
offset_pixels = (offset_inches / scaling_factor)*2+1
|
382 |
dilated_mask = cv2.dilate(
|
383 |
objects_mask, np.ones((int(offset_pixels), int(offset_pixels)), np.uint8)
|
384 |
)
|