Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,7 @@ DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
| 9 |
model = torch.hub.load('isl-org/ZoeDepth', "ZoeD_N", pretrained=True).to(DEVICE).eval()
|
| 10 |
|
| 11 |
def predict(image):
|
|
|
|
| 12 |
depth = model.infer_pil(image)
|
| 13 |
colored_depth, vmin, vmax = colorize(depth, cmap='gray_r')
|
| 14 |
|
|
|
|
| 9 |
model = torch.hub.load('isl-org/ZoeDepth', "ZoeD_N", pretrained=True).to(DEVICE).eval()
|
| 10 |
|
| 11 |
def predict(image):
|
| 12 |
+
image.thumbnail((1024,1024))
|
| 13 |
depth = model.infer_pil(image)
|
| 14 |
colored_depth, vmin, vmax = colorize(depth, cmap='gray_r')
|
| 15 |
|