neverix commited on
Commit
e2dc8d7
·
1 Parent(s): 3c74d2a
Files changed (1) hide show
  1. app.py +1 -1
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 /= 255.
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)