Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -55,9 +55,10 @@ def run_theia(image):
|
|
55 |
gt_sam = (255.0 * gt_results[0]).astype(np.uint8)[:, 2 * width // 4 : 3 * width // 4, :]
|
56 |
gt_depth = (255.0 * gt_results[0]).astype(np.uint8)[:, 3 * width // 4 :, :]
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
61 |
|
62 |
with gr.Blocks() as demo:
|
63 |
gr.HTML(load_description("gradio_title.md"))
|
@@ -70,12 +71,15 @@ with gr.Blocks() as demo:
|
|
70 |
submit_button = gr.Button("Submit")
|
71 |
|
72 |
with gr.Column():
|
73 |
-
gr.Markdown("###
|
74 |
-
|
75 |
|
76 |
-
gr.Markdown("###
|
77 |
-
|
78 |
|
79 |
-
|
|
|
|
|
|
|
80 |
|
81 |
demo.launch()
|
|
|
55 |
gt_sam = (255.0 * gt_results[0]).astype(np.uint8)[:, 2 * width // 4 : 3 * width // 4, :]
|
56 |
gt_depth = (255.0 * gt_results[0]).astype(np.uint8)[:, 3 * width // 4 :, :]
|
57 |
|
58 |
+
dinov2_output = [(theia_decode_dino, "Theia"), (gt_dino, "Ground Truth")]
|
59 |
+
sam_output = [(theia_decode_sam, "Theia"), (gt_sam, "Ground Truth")]
|
60 |
+
depth_anything_output = [(theia_decode_depth, "Theia"), (gt_depth, "Ground Truth")]
|
61 |
+
return dinov2_output, sam_output, depth_anything_output
|
62 |
|
63 |
with gr.Blocks() as demo:
|
64 |
gr.HTML(load_description("gradio_title.md"))
|
|
|
71 |
submit_button = gr.Button("Submit")
|
72 |
|
73 |
with gr.Column():
|
74 |
+
gr.Markdown("### DINOv2")
|
75 |
+
dinov2_output = gr.Gallery(label=None, type="numpy")
|
76 |
|
77 |
+
gr.Markdown("### SAM")
|
78 |
+
sam_output = gr.Gallery(label=None, type="numpy")
|
79 |
|
80 |
+
gr.Markdown("### Depth-Anything")
|
81 |
+
depth_anything_output = gr.Gallery(label=None, type="numpy")
|
82 |
+
|
83 |
+
submit_button.click(run_theia, inputs=input_image, outputs=[dinov2_output, sam_output, depth_anything_output])
|
84 |
|
85 |
demo.launch()
|