YannisK commited on
Commit
eae63dc
1 Parent(s): 7bc27fa
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -42,7 +42,8 @@ transform = transforms.Compose([
42
  col = plt.get_cmap('tab10')
43
 
44
  def generate_matching_superfeatures(im1, im2, scale_id=6, threshold=50, sf_ids=''):
45
-
 
46
  # which sf
47
  sf_idx_ = [55, 14, 5, 4, 52, 57, 40, 9]
48
  if sf_ids.lower().startswith('r'):
@@ -173,10 +174,10 @@ css = ".input_image, .input_image {height: 600px !important; width: 600px !impor
173
  iface = gr.Interface(
174
  fn=generate_matching_superfeatures,
175
  inputs=[
176
- gr.inputs.Image(shape=(1024, 1024), type="pil", label="First Image"),
177
- gr.inputs.Image(shape=(1024, 1024), type="pil", label="Second Image"),
178
- # gr.inputs.Image(type="pil", label="First Image"),
179
- # gr.inputs.Image(type="pil", label="Second Image"),
180
  gr.inputs.Slider(minimum=0, maximum=6, step=1, default=2, label="Scale"),
181
  gr.inputs.Slider(minimum=1, maximum=255, step=25, default=100, label="Binarization Threshold"),
182
  gr.inputs.Textbox(lines=1, default="", label="SF IDs to show (comma separated numbers from 0-255; typing 'rX' will return X random SFs", optional=True)],
 
42
  col = plt.get_cmap('tab10')
43
 
44
  def generate_matching_superfeatures(im1, im2, scale_id=6, threshold=50, sf_ids=''):
45
+ print('im1:', im1.size)
46
+ print('im2:', im2.size)
47
  # which sf
48
  sf_idx_ = [55, 14, 5, 4, 52, 57, 40, 9]
49
  if sf_ids.lower().startswith('r'):
 
174
  iface = gr.Interface(
175
  fn=generate_matching_superfeatures,
176
  inputs=[
177
+ # gr.inputs.Image(shape=(1024, 1024), type="pil", label="First Image"),
178
+ # gr.inputs.Image(shape=(1024, 1024), type="pil", label="Second Image"),
179
+ gr.inputs.Image(type="pil", label="First Image"),
180
+ gr.inputs.Image(type="pil", label="Second Image"),
181
  gr.inputs.Slider(minimum=0, maximum=6, step=1, default=2, label="Scale"),
182
  gr.inputs.Slider(minimum=1, maximum=255, step=25, default=100, label="Binarization Threshold"),
183
  gr.inputs.Textbox(lines=1, default="", label="SF IDs to show (comma separated numbers from 0-255; typing 'rX' will return X random SFs", optional=True)],