loicland / superpoint_graph

Large-scale Point Cloud Semantic Segmentation with Superpoint Graphs
MIT License
745 stars 214 forks source link

Inconsistent class_maps for s3dis #273

Closed fclairec closed 1 year ago

fclairec commented 1 year ago

Dear authors,

Nice work done here - thanks. But, it seems to me as if the labels are inconsistently evaluated.. I have written down the steps I checked, and it seems that the inconsistency only effects the final per_class_iou dictionary. Please correct me if I am wrong.

  1. in provider.py object_name_to_label() called in read_s3dis_format() will assign labels as follows 'ceiling': 1, ... , 'clutter': 13, ... , 'stairs': 0,
  2. the next step is to train the supervised partition (supervised_partition.py) where get_s3dis_info() returns 0:'ceiling' and 12:'clutter'. However dbinfo['inv_class_map'] seems not to be used here - so it does not cause issues.
  3. Also when writing the parsed files (by running s3dis_dataset.py) all seems still fine (labels of step 1 are used)
  4. However then when training with main.py, the line dbinfo = s3dis_dataset.get_info(args) fetches the labels as follows 0:'ceiling' and 12:'clutter'. The Training seems fine. In eval_final(), however dbinfo['inv_class_map'].items() is used to gather the per class ious. This will cause false reporting.
loicland commented 1 year ago

This is because 0 is used as the nolabel class during training (stairs are not evaluated). Since the nolabel class is never predicted, we shift the labels by one when evaluating.

To see this, remember that the columns of target for a superpoint are as follows, (see here):

When training, we use the cross entropy with the label mode (target[0]), see here. When evaluating, we compute the precision of the point-level predictions (target[2:]), see here.

fclairec commented 1 year ago

Thanks @loicland for the explanation. I found my thinking mistake..