sjagird1 commited on
Commit
e5024d3
·
verified ·
1 Parent(s): abfdc7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -84,9 +84,13 @@ def apply_depth_aware_blur(image, max_sigma=10, min_sigma=0):
84
 
85
  image_array = np.array(image)
86
  blurred = np.zeros_like(image_array, dtype=np.float32)
 
 
87
 
88
  # Interpolate sigmas based on depth
89
  sigmas = np.interp(depth_map, [0, 1], [min_sigma, max_sigma])
 
 
90
 
91
  # Precompute blurred layers
92
  blur_stack = {}
 
84
 
85
  image_array = np.array(image)
86
  blurred = np.zeros_like(image_array, dtype=np.float32)
87
+
88
+ inverted_depth_map = 1 - depth_map
89
 
90
  # Interpolate sigmas based on depth
91
  sigmas = np.interp(depth_map, [0, 1], [min_sigma, max_sigma])
92
+
93
+
94
 
95
  # Precompute blurred layers
96
  blur_stack = {}