Skip to content

Commit

Permalink
confusion_matrix.py bugfixes (open-mmlab#531)
Browse files Browse the repository at this point in the history
1. Removed invalid `score_threshold` arg  in `nms_rotated` call
2. Passed `--color-theme` to `plot_confusion_matrix`
  • Loading branch information
k-papadakis authored and triple-Mu committed Jan 31, 2023
1 parent 9533cef commit a3cd82f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tools/analysis_tools/confusion_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,8 @@ def analyze_per_img_dets(confusion_matrix,
for det_label, det_bboxes in enumerate(result):
det_bboxes = torch.from_numpy(det_bboxes).float()
if nms_iou_thr:
det_bboxes, _ = nms_rotated(
det_bboxes[:, :5],
det_bboxes[:, -1],
nms_iou_thr,
score_threshold=score_thr)
det_bboxes, _ = nms_rotated(det_bboxes[:, :5], det_bboxes[:, -1],
nms_iou_thr)
ious = rbbox_overlaps(det_bboxes[:, :5], gt_bboxes)
for i, det_bbox in enumerate(det_bboxes):
score = det_bbox[5]
Expand Down Expand Up @@ -261,6 +258,7 @@ def main():
confusion_matrix,
dataset.CLASSES + ('background', ),
save_dir=args.save_dir,
color_theme=args.color_theme,
show=args.show)


Expand Down

0 comments on commit a3cd82f

Please sign in to comment.