Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train_semseg.py labelweights[l - 1] #235

Open
wuwenxuan0226 opened this issue Jul 12, 2023 · 2 comments
Open

train_semseg.py labelweights[l - 1] #235

wuwenxuan0226 opened this issue Jul 12, 2023 · 2 comments

Comments

@wuwenxuan0226
Copy link

wuwenxuan0226 commented Jul 12, 2023

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

@hahaha1014
Copy link

I have the same doubts, have you solved it?

@wuwenxuan0226
Copy link
Author

@hahaha1014

I have the same doubts, have you solved it?

just use labelweights[l]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants