Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -251,9 +251,9 @@ def predict(image):
|
|
| 251 |
objects_mask, scaling_box_coords, orig_size, processed_size, expansion_factor=3.0
|
| 252 |
)
|
| 253 |
# Scale the object mask according to scaling factor
|
| 254 |
-
|
| 255 |
-
Image.fromarray(
|
| 256 |
-
outlines, contours = extract_outlines(
|
| 257 |
dxf = to_dxf(contours)
|
| 258 |
|
| 259 |
return outlines, dxf, objects_mask, scaling_factor, reference_obj_img_scaled
|
|
|
|
| 251 |
objects_mask, scaling_box_coords, orig_size, processed_size, expansion_factor=3.0
|
| 252 |
)
|
| 253 |
# Scale the object mask according to scaling factor
|
| 254 |
+
objects_mask_scaled = scale_image(objects_mask, scaling_factor)
|
| 255 |
+
Image.fromarray(objects_mask_scaled).save("./outputs/scaled_mask_new.jpg")
|
| 256 |
+
outlines, contours = extract_outlines(objects_mask_scaled)
|
| 257 |
dxf = to_dxf(contours)
|
| 258 |
|
| 259 |
return outlines, dxf, objects_mask, scaling_factor, reference_obj_img_scaled
|