amoghrrao commited on
Commit
66a845a
·
verified ·
1 Parent(s): 3b58019

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
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 image, Image.fromarray(segmentation_mask), Image.fromarray((depth_map / np.max(depth_map) * 255).astype(np.uint8)), 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="Original Image"),
91
- # gr.Image(label="Segmentation Mask"),
92
- # gr.Image(label="Depth Map"),
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 map, depth-based blur effect, and Gaussian blur effect."
98
  )
99
 
100
  if __name__ == "__main__":
101
- iface.launch(share=True)
 
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()