ra-led commited on
Commit
423a66d
·
verified ·
1 Parent(s): 05043f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -66,11 +66,14 @@ def predict_depth(input_image):
66
  # Clip inverse depth to 0-10 range
67
  inverse_depth_clipped = np.clip(inverse_depth, 0, 10)
68
 
 
 
 
69
  # Create a color map
70
  plt.figure(figsize=(15.36, 15.36), dpi=100) # Set figure size to 1536x1536 pixels
71
- plt.imshow(inverse_depth_clipped, cmap='viridis')
72
- plt.colorbar(label='Inverse Depth')
73
- plt.title('Predicted Inverse Depth Map')
74
  plt.axis('off')
75
 
76
  # Save the plot to a file
 
66
  # Clip inverse depth to 0-10 range
67
  inverse_depth_clipped = np.clip(inverse_depth, 0, 10)
68
 
69
+ # Normalize
70
+ norm_depth = np.log(depth)
71
+
72
  # Create a color map
73
  plt.figure(figsize=(15.36, 15.36), dpi=100) # Set figure size to 1536x1536 pixels
74
+ plt.imshow(norm_depth, cmap='viridis')
75
+ plt.colorbar(label='Normalized Depth')
76
+ plt.title('Predicted Normalized Depth Map')
77
  plt.axis('off')
78
 
79
  # Save the plot to a file