invert depth map
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def process_image(image_path):
|
|
38 |
align_corners=False,
|
39 |
).squeeze()
|
40 |
output = prediction.cpu().numpy()
|
41 |
-
depth_image = (output * 255 / np.max(output)).astype('uint8')
|
42 |
depth_image_padded = np.array(ImageOps.pad(
|
43 |
Image.fromarray(depth_image), (1280, 720)))
|
44 |
|
|
|
38 |
align_corners=False,
|
39 |
).squeeze()
|
40 |
output = prediction.cpu().numpy()
|
41 |
+
depth_image = (255 - output * 255 / np.max(output)).astype('uint8')
|
42 |
depth_image_padded = np.array(ImageOps.pad(
|
43 |
Image.fromarray(depth_image), (1280, 720)))
|
44 |
|