YannisK commited on
Commit
371f74f
1 Parent(s): dec7f09
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -146,6 +146,7 @@ def generate_matching_superfeatures(im1, im2, scale_id=6, threshold=50, sf_ids='
146
  if only_matching:
147
  if random_mode:
148
  sf_idx_ = [int(jj) for jj in ind_match[np.random.randint(len(list(ind_match)), size=n_sf_ids)].numpy()]
 
149
  else:
150
  sf_idx_ = [i for i in sf_idx_ if i in list(ind_match)]
151
 
@@ -273,7 +274,7 @@ iface = gr.Interface(
273
  css=css,
274
  examples=[
275
  ["chateau_1.png", "chateau_2.png", 2, 100, '55,14,5,4,52,57,40,9', True],
276
- ["anafi1.jpeg", "anafi2.jpeg", 4, 150, '1,67,54,177,51,141,185,99', True],
277
  ["areopoli1.jpeg", "areopoli2.jpeg", 4, 50, '72,44,142,213,236', True],
278
  ]
279
  )
 
146
  if only_matching:
147
  if random_mode:
148
  sf_idx_ = [int(jj) for jj in ind_match[np.random.randint(len(list(ind_match)), size=n_sf_ids)].numpy()]
149
+ sf_idx_ = list( dict.fromkeys(sf_idx_) )
150
  else:
151
  sf_idx_ = [i for i in sf_idx_ if i in list(ind_match)]
152
 
 
274
  css=css,
275
  examples=[
276
  ["chateau_1.png", "chateau_2.png", 2, 100, '55,14,5,4,52,57,40,9', True],
277
+ ["anafi1.jpeg", "anafi2.jpeg", 4, 150, '51,141,185,99,', True],
278
  ["areopoli1.jpeg", "areopoli2.jpeg", 4, 50, '72,44,142,213,236', True],
279
  ]
280
  )