YannisK commited on
Commit
e52b6e6
1 Parent(s): 5d782f7
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -85,7 +85,7 @@ def generate_matching_superfeatures(im1, im2, scale_id=6, threshold=50):
85
 
86
  fin_img = []
87
  img1rsz = np.copy(im1_cv)
88
- print(im1.size)
89
  print(img1rsz.shape)
90
  for j, att in enumerate(all_att_bin1):
91
  att = cv2.resize(att, im1.size, interpolation=cv2.INTER_NEAREST)
@@ -152,7 +152,7 @@ iface = gr.Interface(
152
  gr.inputs.Image(shape=(1024, 1024), type="pil"),
153
  gr.inputs.Image(shape=(1024, 1024), type="pil"),
154
  gr.inputs.Slider(minimum=1, maximum=7, step=1, default=2, label="Scale"),
155
- gr.inputs.Slider(minimum=1, maximum=255, step=25, default=50, label="Binarizatio Threshold")],
156
  outputs="plot",
157
  # outputs=gr.outputs.Image(shape=(1024,2048), type="plot"),
158
  enable_queue=True,
@@ -160,6 +160,6 @@ iface = gr.Interface(
160
  description=description,
161
  article=article,
162
  css=css,
163
- examples=[["chateau_1.png", "chateau_2.png", 6, 50]],
164
  )
165
- iface.launch()
 
85
 
86
  fin_img = []
87
  img1rsz = np.copy(im1_cv)
88
+ print('im1:', im1.size)
89
  print(img1rsz.shape)
90
  for j, att in enumerate(all_att_bin1):
91
  att = cv2.resize(att, im1.size, interpolation=cv2.INTER_NEAREST)
 
152
  gr.inputs.Image(shape=(1024, 1024), type="pil"),
153
  gr.inputs.Image(shape=(1024, 1024), type="pil"),
154
  gr.inputs.Slider(minimum=1, maximum=7, step=1, default=2, label="Scale"),
155
+ gr.inputs.Slider(minimum=1, maximum=255, step=25, default=50, label="Binarization Threshold")],
156
  outputs="plot",
157
  # outputs=gr.outputs.Image(shape=(1024,2048), type="plot"),
158
  enable_queue=True,
 
160
  description=description,
161
  article=article,
162
  css=css,
163
+ examples=[["chateau_1.png", "chateau_2.png", 2, 50]],
164
  )
165
+ iface.l