Spaces:
Build error
Build error
edits
Browse files
app.py
CHANGED
@@ -91,7 +91,7 @@ def match(query_feat, pos_feat, LoweRatioTh=0.9):
|
|
91 |
|
92 |
col = plt.get_cmap('tab10')
|
93 |
|
94 |
-
def generate_matching_superfeatures(im1, im2, Imagenet_model=False, scale_id=6, threshold=50, random_mode=False, sf_ids=''
|
95 |
print('im1:', im1.size)
|
96 |
print('im2:', im2.size)
|
97 |
|
@@ -247,7 +247,7 @@ def generate_matching_superfeatures(im1, im2, Imagenet_model=False, scale_id=6,
|
|
247 |
handles = [f("s", col.colors[i]) for i in range(n_sf_ids)]
|
248 |
labels = sf_idx_
|
249 |
fig_leg = plt.figure(3)
|
250 |
-
legend = plt.legend(handles, sf_idx_,
|
251 |
# fig_leg = legend.figure
|
252 |
fig_leg.canvas.draw()
|
253 |
ax3 = plt.gca()
|
@@ -278,7 +278,7 @@ iface = gr.Interface(
|
|
278 |
gr.inputs.Slider(minimum=0, maximum=255, step=25, default=150, label="Binarization Threshold"),
|
279 |
gr.inputs.Checkbox(default=False, label="Show random (matching) SFs"),
|
280 |
gr.inputs.Textbox(lines=1, default="", label="...or show specific SF IDs:", optional=True),
|
281 |
-
gr.inputs.Checkbox(default=True, label="Show only matching SFs"),
|
282 |
],
|
283 |
outputs=[
|
284 |
gr.outputs.Image(type="plot", label="First Image SFs"),
|
@@ -292,9 +292,9 @@ iface = gr.Interface(
|
|
292 |
description=description,
|
293 |
article=article,
|
294 |
examples=[
|
295 |
-
["chateau_1.png", "chateau_2.png", False, 3, 150, True, ''
|
296 |
-
["anafi1.jpeg", "anafi2.jpeg", False, 4, 150, True, ''
|
297 |
-
["areopoli1.jpeg", "areopoli2.jpeg", False, 4, 150, True, ''
|
298 |
]
|
299 |
)
|
300 |
iface.launch(enable_queue=True)
|
|
|
91 |
|
92 |
col = plt.get_cmap('tab10')
|
93 |
|
94 |
+
def generate_matching_superfeatures(im1, im2, Imagenet_model=False, scale_id=6, threshold=50, random_mode=False, sf_ids=''): #, only_matching=True):
|
95 |
print('im1:', im1.size)
|
96 |
print('im2:', im2.size)
|
97 |
|
|
|
247 |
handles = [f("s", col.colors[i]) for i in range(n_sf_ids)]
|
248 |
labels = sf_idx_
|
249 |
fig_leg = plt.figure(3)
|
250 |
+
legend = plt.legend(handles, sf_idx_, framealpha=1, frameon=False, facecolor='w',fontsize=15, loc="center")
|
251 |
# fig_leg = legend.figure
|
252 |
fig_leg.canvas.draw()
|
253 |
ax3 = plt.gca()
|
|
|
278 |
gr.inputs.Slider(minimum=0, maximum=255, step=25, default=150, label="Binarization Threshold"),
|
279 |
gr.inputs.Checkbox(default=False, label="Show random (matching) SFs"),
|
280 |
gr.inputs.Textbox(lines=1, default="", label="...or show specific SF IDs:", optional=True),
|
281 |
+
# gr.inputs.Checkbox(default=True, label="Show only matching SFs"),
|
282 |
],
|
283 |
outputs=[
|
284 |
gr.outputs.Image(type="plot", label="First Image SFs"),
|
|
|
292 |
description=description,
|
293 |
article=article,
|
294 |
examples=[
|
295 |
+
["chateau_1.png", "chateau_2.png", False, 3, 150, True, ''],
|
296 |
+
["anafi1.jpeg", "anafi2.jpeg", False, 4, 150, True, ''],
|
297 |
+
["areopoli1.jpeg", "areopoli2.jpeg", False, 4, 150, True, ''],
|
298 |
]
|
299 |
)
|
300 |
iface.launch(enable_queue=True)
|