Spaces:
Runtime error
Runtime error
neverix
commited on
Commit
·
e2dc8d7
1
Parent(s):
3c74d2a
Let's go
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ class MidasDepth(object):
|
|
14 |
if not isinstance(image, np.ndarray):
|
15 |
image = np.asarray(image)
|
16 |
if (image > 1).any():
|
17 |
-
image
|
18 |
with torch.inference_mode():
|
19 |
batch = self.transform(image[..., :3]).to(self.device)
|
20 |
prediction = self.midas(batch)
|
|
|
14 |
if not isinstance(image, np.ndarray):
|
15 |
image = np.asarray(image)
|
16 |
if (image > 1).any():
|
17 |
+
image = image.astype("float64") / 255.
|
18 |
with torch.inference_mode():
|
19 |
batch = self.transform(image[..., :3]).to(self.device)
|
20 |
prediction = self.midas(batch)
|