Pointnet_Pointnet2_pytorch icon indicating copy to clipboard operation
Pointnet_Pointnet2_pytorch copied to clipboard

train_semseg.py labelweights[l - 1]

Open wuwenxuan0226 opened this issue 2 years ago • 2 comments

In line 268,

            for l in range(NUM_CLASSES):
                iou_per_class_str += 'class %s weight: %.3f, IoU: %.3f \n' % (
                    seg_label_to_cat[l] + ' ' * (14 - len(seg_label_to_cat[l])), labelweights[l - 1],
                    total_correct_class[l] / float(total_iou_deno_class[l]))

I think labelweights[l - 1] should be labelweights[l]. In line 249, np.histogram(batch_label, range(NUM_CLASSES + 1)) will return an array which size is 13, although use range(NUM_CLASSES + 1).

wuwenxuan0226 avatar Jul 12 '23 04:07 wuwenxuan0226

I have the same doubts, have you solved it?

hahaha1014 avatar Oct 20 '23 08:10 hahaha1014

@hahaha1014

I have the same doubts, have you solved it?

just use labelweights[l]

wuwenxuan0226 avatar Oct 20 '23 11:10 wuwenxuan0226