YannisK commited on
Commit
411e4cb
1 Parent(s): 3ea46fa
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -96,7 +96,11 @@ def clear_figures():
96
 
97
  col = plt.get_cmap('tab10')
98
 
99
- def generate_matching_superfeatures(im1, im2, Imagenet_model=False, scale_id=6, threshold=50, random_mode=False, sf_ids=''): #, only_matching=True):
 
 
 
 
100
  print('im1:', im1.size)
101
  print('im2:', im2.size)
102
 
@@ -262,9 +266,9 @@ iface = gr.Interface(
262
  gr.inputs.Image(type="pil", label="First Image"),
263
  gr.inputs.Image(type="pil", label="Second Image"),
264
  gr.inputs.Checkbox(default=False, label="Model trained on ImageNet (Default: SfM-120k)"),
265
- gr.inputs.Slider(minimum=0, maximum=6, step=1, default=2, label="Scale"),
266
- gr.inputs.Slider(minimum=0, maximum=255, step=25, default=150, label="Binarization Threshold"),
267
- gr.inputs.Checkbox(default=False, label="Show random (matching) SFs"),
268
  gr.inputs.Textbox(lines=1, default="", label="...or show specific SF IDs:", optional=True),
269
  # gr.inputs.Checkbox(default=True, label="Show only matching SFs"),
270
  ],
 
96
 
97
  col = plt.get_cmap('tab10')
98
 
99
+ def generate_matching_superfeatures(
100
+ im1, im2,
101
+ Imagenet_model=False,
102
+ scale_id=6, threshold=50,
103
+ random_mode=False, sf_ids=''): #, only_matching=True):
104
  print('im1:', im1.size)
105
  print('im2:', im2.size)
106
 
 
266
  gr.inputs.Image(type="pil", label="First Image"),
267
  gr.inputs.Image(type="pil", label="Second Image"),
268
  gr.inputs.Checkbox(default=False, label="Model trained on ImageNet (Default: SfM-120k)"),
269
+ gr.inputs.Slider(minimum=0, maximum=6, step=1, default=4, label="Scale"),
270
+ gr.inputs.Slider(minimum=0, maximum=255, step=25, default=50, label="Binarization Threshold"),
271
+ gr.inputs.Checkbox(default=True, label="Show random (matching) SFs"),
272
  gr.inputs.Textbox(lines=1, default="", label="...or show specific SF IDs:", optional=True),
273
  # gr.inputs.Checkbox(default=True, label="Show only matching SFs"),
274
  ],