Update app.py
Browse files
app.py
CHANGED
@@ -81,21 +81,19 @@ def process_image_pipeline(image):
|
|
81 |
blurred_image = apply_depth_based_blur(image, depth_map)
|
82 |
gaussian_blur_image = apply_blur(image, segmentation_mask)
|
83 |
|
84 |
-
return
|
85 |
|
86 |
iface = gr.Interface(
|
87 |
fn=process_image_pipeline,
|
88 |
inputs=gr.Image(type="pil"),
|
89 |
outputs=[
|
90 |
-
gr.Image(label="
|
91 |
-
|
92 |
-
|
93 |
-
gr.Image(label="Lens Blur Effects"),
|
94 |
-
gr.Image(label="Gaussian Blur Effects")
|
95 |
],
|
96 |
title="Segmentation and Depth-Based Image Processing",
|
97 |
-
description="Upload an image to get segmentation mask, depth
|
98 |
)
|
99 |
|
100 |
if __name__ == "__main__":
|
101 |
-
iface.launch(
|
|
|
81 |
blurred_image = apply_depth_based_blur(image, depth_map)
|
82 |
gaussian_blur_image = apply_blur(image, segmentation_mask)
|
83 |
|
84 |
+
return Image.fromarray(segmentation_mask), blurred_image, gaussian_blur_image
|
85 |
|
86 |
iface = gr.Interface(
|
87 |
fn=process_image_pipeline,
|
88 |
inputs=gr.Image(type="pil"),
|
89 |
outputs=[
|
90 |
+
gr.Image(label="Segmentation Mask"),
|
91 |
+
gr.Image(label="Depth-based Blurred Image"),
|
92 |
+
gr.Image(label="Gaussian Blur Image")
|
|
|
|
|
93 |
],
|
94 |
title="Segmentation and Depth-Based Image Processing",
|
95 |
+
description="Upload an image to get segmentation mask, depth-based blur effect, and Gaussian blur effect."
|
96 |
)
|
97 |
|
98 |
if __name__ == "__main__":
|
99 |
+
iface.launch()
|