YannisK commited on
Commit
8222092
1 Parent(s): cc9878d
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -204,8 +204,9 @@ def generate_matching_superfeatures(im1, im2, Imagenet_model=False, scale_id=6,
204
  # print('att:', att.shape)
205
  mask2d = zip(*np.where(att==255))
206
  for m,n in mask2d:
207
- col_ = col.colors[j] if j < 7 else col.colors[j+1]
208
- if j == 0: col_ = col.colors[9]
 
209
  col_ = 255*np.array(colors.to_rgba(col_))[:3]
210
  img2rsz[m,n, :] = col_[::-1]
211
  fin_img.append(img2rsz)
@@ -243,7 +244,7 @@ def generate_matching_superfeatures(im1, im2, Imagenet_model=False, scale_id=6,
243
 
244
 
245
  f = lambda m,c: plt.plot([],[],marker=m, color=c, ls="none")[0]
246
- handles = [f("s", col[i]) for i in range(n_sf_ids)]
247
  labels = sf_idx_
248
  legend = plt.legend(handles, sf_idx_, loc=3, framealpha=1, frameon=False)
249
 
 
204
  # print('att:', att.shape)
205
  mask2d = zip(*np.where(att==255))
206
  for m,n in mask2d:
207
+ col_ = col.colors[j]
208
+ # col_ = col.colors[j] if j < 7 else col.colors[j+1]
209
+ # if j == 0: col_ = col.colors[9]
210
  col_ = 255*np.array(colors.to_rgba(col_))[:3]
211
  img2rsz[m,n, :] = col_[::-1]
212
  fin_img.append(img2rsz)
 
244
 
245
 
246
  f = lambda m,c: plt.plot([],[],marker=m, color=c, ls="none")[0]
247
+ handles = [f("s", col.colors[i]) for i in range(n_sf_ids)]
248
  labels = sf_idx_
249
  legend = plt.legend(handles, sf_idx_, loc=3, framealpha=1, frameon=False)
250