Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -97,9 +97,10 @@ with gr.Blocks(title="DINOv3 Keypoint Matching") as demo:
|
|
97 |
gr.Markdown("DINOv3 can be used to find matching features between two images.")
|
98 |
gr.Markdown("Upload two images to find corresponding keypoints using DINOv3 features, switch between different DINOv3 checkpoints.")
|
99 |
with gr.Row():
|
100 |
-
image1 = gr.Image(label="Image 1", type="numpy")
|
101 |
-
image2 = gr.Image(label="Image 2", type="numpy")
|
102 |
with gr.Column(scale=1):
|
|
|
|
|
|
|
103 |
model_selector = gr.Dropdown(
|
104 |
choices=list(DINO_MODELS.keys()),
|
105 |
value=_default_model_name,
|
@@ -113,8 +114,8 @@ with gr.Blocks(title="DINOv3 Keypoint Matching") as demo:
|
|
113 |
container=False,
|
114 |
)
|
115 |
match_btn = gr.Button("Find Correspondences", variant="primary")
|
116 |
-
|
117 |
-
|
118 |
model_selector.change(fn=load_model, inputs=[model_selector], outputs=[status_bar])
|
119 |
match_btn.click(fn=match_keypoints, inputs=[image1, image2, model_selector], outputs=[output_image])
|
120 |
gr.Examples(
|
|
|
97 |
gr.Markdown("DINOv3 can be used to find matching features between two images.")
|
98 |
gr.Markdown("Upload two images to find corresponding keypoints using DINOv3 features, switch between different DINOv3 checkpoints.")
|
99 |
with gr.Row():
|
|
|
|
|
100 |
with gr.Column(scale=1):
|
101 |
+
with gr.Row(scale=1):
|
102 |
+
image1 = gr.Image(label="Image 1", type="numpy")
|
103 |
+
image2 = gr.Image(label="Image 2", type="numpy")
|
104 |
model_selector = gr.Dropdown(
|
105 |
choices=list(DINO_MODELS.keys()),
|
106 |
value=_default_model_name,
|
|
|
114 |
container=False,
|
115 |
)
|
116 |
match_btn = gr.Button("Find Correspondences", variant="primary")
|
117 |
+
with gr.Column(scale=1):
|
118 |
+
output_image = gr.Image(label="Matched Keypoints")
|
119 |
model_selector.change(fn=load_model, inputs=[model_selector], outputs=[status_bar])
|
120 |
match_btn.click(fn=match_keypoints, inputs=[image1, image2, model_selector], outputs=[output_image])
|
121 |
gr.Examples(
|