@@ -168,7 +168,7 @@ def process_siamese(data, i):
168
168
pred ["keypoints0" ],
169
169
pred ["keypoints1" ],
170
170
** data ,
171
- pos_th = self .conf .ground_truth .th_positive
171
+ pos_th = self .conf .ground_truth .th_positive ,
172
172
)
173
173
pred ["gt_assignment" ] = assignment
174
174
pred ["gt_matches0" ], pred ["gt_matches1" ] = m0 , m1
@@ -188,7 +188,7 @@ def process_siamese(data, i):
188
188
pred ["lines0" ].reshape (b_size , - 1 , 2 ),
189
189
pred ["lines1" ].reshape (b_size , - 1 , 2 ),
190
190
** data ,
191
- pos_th = self .conf .ground_truth .th_positive
191
+ pos_th = self .conf .ground_truth .th_positive ,
192
192
)
193
193
pred ["samples_gt_assignment" ] = samples_assignment
194
194
pred ["samples_gt_matches0" ] = samples_m0
@@ -219,7 +219,7 @@ def process_siamese(data, i):
219
219
pred ["keypoints1" ],
220
220
** data ,
221
221
pos_th = self .conf .ground_truth .th_positive ,
222
- neg_th = self .conf .ground_truth .th_negative
222
+ neg_th = self .conf .ground_truth .th_negative ,
223
223
)
224
224
pred ["gt_assignment" ] = assignment
225
225
pred ["gt_matches0" ], pred ["gt_matches1" ] = m0 , m1
@@ -244,10 +244,8 @@ def process_siamese(data, i):
244
244
pred ["lines1" ].reshape (b_size , - 1 , 2 ),
245
245
** data ,
246
246
pos_th = self .conf .ground_truth .th_positive ,
247
- neg_th = self .conf .ground_truth .th_negative
248
- )[
249
- :3
250
- ]
247
+ neg_th = self .conf .ground_truth .th_negative ,
248
+ )[:3 ]
251
249
pred ["samples_gt_assignment" ] = samples_assignment
252
250
pred ["samples_gt_matches0" ] = samples_m0
253
251
pred ["samples_gt_matches1" ] = samples_m1
@@ -308,13 +306,13 @@ def process_siamese(data, i):
308
306
assert match_mat .shape [0 ] == 1
309
307
bool_match_mat = match_mat [0 ] > 0
310
308
pred ["line_matches0" ] = np .argmax (bool_match_mat , axis = 1 )
311
- pred ["line_matches0" ][
312
- ~ np . any ( bool_match_mat , axis = 1 )
313
- ] = UNMATCHED_FEATURE
309
+ pred ["line_matches0" ][~ np . any ( bool_match_mat , axis = 1 )] = (
310
+ UNMATCHED_FEATURE
311
+ )
314
312
pred ["line_matches1" ] = np .argmax (bool_match_mat , axis = 0 )
315
- pred ["line_matches1" ][
316
- ~ np . any ( bool_match_mat , axis = 0 )
317
- ] = UNMATCHED_FEATURE
313
+ pred ["line_matches1" ][~ np . any ( bool_match_mat , axis = 0 )] = (
314
+ UNMATCHED_FEATURE
315
+ )
318
316
pred ["line_matches0" ] = torch .from_numpy (pred ["line_matches0" ])[None ]
319
317
pred ["line_matches1" ] = torch .from_numpy (pred ["line_matches1" ])[None ]
320
318
lmatch_scores = torch .from_numpy (
0 commit comments