Spaces:
Running
Running
Update app.py
Browse files
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(
|
| 72 |
-
plt.colorbar(label='
|
| 73 |
-
plt.title('Predicted
|
| 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
|