Spaces:
Build error
Build error
edits
Browse files
app.py
CHANGED
@@ -149,12 +149,12 @@ def generate_matching_superfeatures(im1, im2, Imagenet_model=False, scale_id=6,
|
|
149 |
sf_idx_ = map(int, sf_ids.strip().split(','))
|
150 |
n_sf_ids = len(sf_idx_)
|
151 |
|
152 |
-
if only_matching:
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
|
159 |
|
160 |
|
|
|
149 |
sf_idx_ = map(int, sf_ids.strip().split(','))
|
150 |
n_sf_ids = len(sf_idx_)
|
151 |
|
152 |
+
# if only_matching:
|
153 |
+
if random_mode:
|
154 |
+
sf_idx_ = [int(jj) for jj in ind_match[np.random.randint(len(list(ind_match)), size=n_sf_ids)].numpy()]
|
155 |
+
sf_idx_ = list( dict.fromkeys(sf_idx_) )
|
156 |
+
else:
|
157 |
+
sf_idx_ = [i for i in sf_idx_ if i in list(ind_match)]
|
158 |
|
159 |
|
160 |
|