Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ def pq_compute_single_core(proc_id, annotation_set, gt_folder, pred_folder, cate
gt_pred_map = {}
labels, labels_cnt = np.unique(pan_gt_pred, return_counts=True)
for label, intersection in zip(labels, labels_cnt):
gt_id = label // OFFSET
pred_id = label % OFFSET
gt_id = (label // OFFSET).astype(np.uint64)
pred_id = (label % OFFSET).astype(np.uint64)
gt_pred_map[(gt_id, pred_id)] = intersection

# count all matched pairs
gt_matched = set()
pred_matched = set()
for label_tuple, intersection in gt_pred_map.items():
gt_label, pred_label = label_tuple
if gt_label not in gt_segms:
if gt_label == VOID:
continue
if pred_label not in pred_segms:
if pred_label == VOID:
continue
if gt_segms[gt_label]['iscrowd'] == 1:
continue
Expand Down