Skip to content

label_map used twice during evaluation #1415

@panfeng-hover

Description

@panfeng-hover

I write a customized dataset, where the label ids are (0, 1, 2, 3, 4, 5, 6), and I would like to merge some classes, so I set

  1. self.custom_classes = True
  2. self.label_map ={4: 3, 6: 3, 5: 4}.
    Namely convert label ids of 4 & 6 in the ground truth to 3, and convert label id 5 to 4, as mmsegmentation is assuming the label ids is continuous,

However, it looks like the label_map is wrongly used during evaluation, in details,

the self.get_gt_seg_map_by_idx(index) used here already converted the ground truth label ids from (0, 1, 2, 3, 4, 5, 6) to (0, 1, 2, 3, 4), but during later intersect_and_union, the label_map is used again, so the ground truth label ids will become (0, 1, 2, 3) from (0, 1, 2, 3, 4).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions