bmay commited on
Commit
8232dd0
1 Parent(s): 23c6348

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,7 +21,8 @@ def run_theia(image):
21
  mask_generator, sam_model = prepare_mask_generator('cuda')
22
  depth_anything_model_name = "LiheYoung/depth-anything-large-hf"
23
  depth_anything_decoder, _ = prepare_depth_decoder(depth_anything_model_name, 'cuda')
24
-
 
25
  images = [image]
26
 
27
  theia_decode_results, gt_decode_results = decode_everything(
@@ -44,5 +45,5 @@ def run_theia(image):
44
 
45
  return vis_video
46
 
47
- demo = gr.Interface(fn=run_theia, inputs=gr.Image(type="pil", width=224, height=224), outputs=gr.Image(type="numpy"))
48
  demo.launch()
 
21
  mask_generator, sam_model = prepare_mask_generator('cuda')
22
  depth_anything_model_name = "LiheYoung/depth-anything-large-hf"
23
  depth_anything_decoder, _ = prepare_depth_decoder(depth_anything_model_name, 'cuda')
24
+
25
+ image = torch.transforms.v2.Resize(size=(224, 224))(image)
26
  images = [image]
27
 
28
  theia_decode_results, gt_decode_results = decode_everything(
 
45
 
46
  return vis_video
47
 
48
+ demo = gr.Interface(fn=run_theia, inputs=gr.Image(type="pil"), outputs=gr.Image(type="numpy"))
49
  demo.launch()