Spaces:
Runtime error
Runtime error
Update depth_detection.py
Browse files- depth_detection.py +1 -1
depth_detection.py
CHANGED
@@ -15,5 +15,5 @@ def depth_detection(image, pad=16):
|
|
15 |
|
16 |
output = predicted_depth.squeeze().cpu().numpy() * 1000.0
|
17 |
output = output[pad:-pad, pad:-pad]
|
18 |
-
new_image = new_img.crop((pad, pad,
|
19 |
return new_image,output
|
|
|
15 |
|
16 |
output = predicted_depth.squeeze().cpu().numpy() * 1000.0
|
17 |
output = output[pad:-pad, pad:-pad]
|
18 |
+
new_image = new_img.crop((pad, pad, new_img.width - pad, new_img.height - pad))
|
19 |
return new_image,output
|