Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,12 @@ def blurr_object(image, object, blur_strength):
|
|
44 |
mask_array_three_channel_invert = 1-mask_array_three_channel
|
45 |
blur_image_reverse_mask = blur_image*mask_array_three_channel_invert
|
46 |
|
|
|
|
|
47 |
blurred_output_image = Image.fromarray((blur_image_reverse_mask).astype(np.uint8)+segmented_image.astype(np.uint8))
|
48 |
for _ in range(int(blur_strength//2.5)):
|
49 |
blurred_output_image = blurred_output_image.filter(ImageFilter.SMOOTH_MORE)
|
50 |
-
return blurred_output_image,
|
51 |
|
52 |
app = gr.Blocks()
|
53 |
|
|
|
44 |
mask_array_three_channel_invert = 1-mask_array_three_channel
|
45 |
blur_image_reverse_mask = blur_image*mask_array_three_channel_invert
|
46 |
|
47 |
+
seg_out=segmented_image.astype(np.uint8)
|
48 |
+
|
49 |
blurred_output_image = Image.fromarray((blur_image_reverse_mask).astype(np.uint8)+segmented_image.astype(np.uint8))
|
50 |
for _ in range(int(blur_strength//2.5)):
|
51 |
blurred_output_image = blurred_output_image.filter(ImageFilter.SMOOTH_MORE)
|
52 |
+
return blurred_output_image, seg_out
|
53 |
|
54 |
app = gr.Blocks()
|
55 |
|