CharlieAmalet commited on
Commit
10674e9
·
verified ·
1 Parent(s): c23facb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -52,19 +52,17 @@ def process_image(image: Image.Image):
52
  image = image.convert("RGB")
53
 
54
  device = "cuda" if torch.cuda.is_available() else "cpu"
55
- # model.to(device)
56
- # depth = model.infer_pil(image)
57
-
58
- # processed_array = save_raw_16bit(colorize(depth)[:, :, 0])
59
- # return Image.fromarray(processed_array)
60
-
61
  model.to(device)
62
-
63
- # # inference
64
- processed_array = pipe(image)["depth"]
65
 
 
66
  return Image.fromarray(processed_array)
67
 
 
 
 
 
 
68
  # ----------- Depth functions
69
 
70
  # ----------- Mesh functions
 
52
  image = image.convert("RGB")
53
 
54
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
 
 
 
 
 
55
  model.to(device)
56
+ depth = model.infer_pil(image)
 
 
57
 
58
+ processed_array = save_raw_16bit(colorize(depth)[:, :, 0])
59
  return Image.fromarray(processed_array)
60
 
61
+ # model.to(device)
62
+
63
+ # processed_array = pipe(image)["depth"]
64
+ # return Image.fromarray(processed_array)
65
+
66
  # ----------- Depth functions
67
 
68
  # ----------- Mesh functions