Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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"
|
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()
|