Skip to content

Commit cc5b9dd

Browse files
committed
better comment
1 parent 9b66276 commit cc5b9dd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/valor_lite/object_detection/evaluator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,11 @@ def filter(
376376
mask_valid_gt &= mask_valid
377377
mask_valid_pd &= mask_valid
378378

379-
# np.ix_ officially supports boolean masks, but type stubs are overly restrictive
379+
# filter out invalid gt_id, gt_label_id by setting to -1.0
380380
pairs[np.ix_(~mask_valid_gt, (1, 3))] = -1.0 # type: ignore[reportArgumentType]
381+
# filter out invalid pd_id, pd_label_id, pd_score by setting to -1.0
381382
pairs[np.ix_(~mask_valid_pd, (2, 4, 6))] = -1.0 # type: ignore[reportArgumentType]
383+
# filter out invalid iou by setting to 0.0
382384
pairs[~mask_valid_pd | ~mask_valid_gt, 5] = 0.0
383385

384386
for idx, col in enumerate(columns):

0 commit comments

Comments
 (0)