Spaces:
Runtime error
Runtime error
jhj0517
commited on
Commit
·
075107e
1
Parent(s):
4e46389
Add save_image
Browse files- modules/sam_inference.py +1 -2
modules/sam_inference.py
CHANGED
|
@@ -206,7 +206,6 @@ class SamInference:
|
|
| 206 |
"image": images[out_frame_idx],
|
| 207 |
"mask": mask
|
| 208 |
}
|
| 209 |
-
print("frame_idx: ", out_frame_idx)
|
| 210 |
except Exception as e:
|
| 211 |
logger.exception(f"Error while propagating in video: {str(e)}")
|
| 212 |
raise RuntimeError(f"Failed to propagate in video: {str(e)}") from e
|
|
@@ -298,7 +297,7 @@ class SamInference:
|
|
| 298 |
elif filter_mode == PIXELIZE_FILTER:
|
| 299 |
filtered_image = create_mask_pixelized_image(orig_image, masks, pixel_size)
|
| 300 |
|
| 301 |
-
save_image(filtered_image,
|
| 302 |
|
| 303 |
def divide_layer(self,
|
| 304 |
image_input: np.ndarray,
|
|
|
|
| 206 |
"image": images[out_frame_idx],
|
| 207 |
"mask": mask
|
| 208 |
}
|
|
|
|
| 209 |
except Exception as e:
|
| 210 |
logger.exception(f"Error while propagating in video: {str(e)}")
|
| 211 |
raise RuntimeError(f"Failed to propagate in video: {str(e)}") from e
|
|
|
|
| 297 |
elif filter_mode == PIXELIZE_FILTER:
|
| 298 |
filtered_image = create_mask_pixelized_image(orig_image, masks, pixel_size)
|
| 299 |
|
| 300 |
+
save_image(image=filtered_image, output_dir=TEMP_OUT_DIR)
|
| 301 |
|
| 302 |
def divide_layer(self,
|
| 303 |
image_input: np.ndarray,
|