radames HF staff commited on
Commit
a9bf5f9
1 Parent(s): b3ad117

invert depth map

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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