xinge008 / Cylinder3D

Rank 1st in the leaderboard of SemanticKITTI semantic segmentation (both single-scan and multi-scan) (Nov. 2020) (CVPR2021 Oral)
Apache License 2.0
859 stars 180 forks source link

[Help Wanted](Per Class IU Calculation) Problem in utils>metric_util.py #80

Open Guru-Deep-Singh opened 3 years ago

Guru-Deep-Singh commented 3 years ago

Dear Authors,

In the function fast_hist_crop, I see that you are removing the 0th row and 0th column before calculating the IOU. However, this will remove the points predicted 0 for ground truth other than 0 and also all the points which have ground truth 0 and are predicted something else.

I think the code should be changed to : def fast_hist_crop(output, target, unique_label): hist = fast_hist(output.flatten(), target.flatten(), np.max(unique_label) + 2) hist = hist[:-1, :] hist = hist[:, :-1] return hist

This will remove the last column and last row. This will remove the row and column of the class which is not in the unique value of classes.

Guru-Deep-Singh commented 3 years ago

Hello Authors! Can you please look into my query.

Thank you

xinge008 commented 3 years ago

@Guru-Deep-Singh In my opinion, the predicted 0 is the ignore. So we just follow existing methods to remove these predictions. You can also see it in many previous work, like PolarSeg, SalsaNext, etc.