Cylinder3D icon indicating copy to clipboard operation
Cylinder3D copied to clipboard

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

Open Guru-Deep-Singh opened this issue 4 years ago • 2 comments

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 avatar Oct 05 '21 14:10 Guru-Deep-Singh

Hello Authors! Can you please look into my query.

Thank you

Guru-Deep-Singh avatar Nov 12 '21 15:11 Guru-Deep-Singh

@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.

xinge008 avatar Nov 13 '21 09:11 xinge008