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

NYUV2 weight test SUNRGBD #55

Open
zhouqunbing opened this issue Apr 14, 2023 · 3 comments
Open

NYUV2 weight test SUNRGBD #55

zhouqunbing opened this issue Apr 14, 2023 · 3 comments

Comments

@zhouqunbing
Copy link

I trained a model on nyuv2,and i want to use the model to directly test on SUNRGBD dataset.But the classes in nyuv2 are 40 ,and the sunrgbd are 37,so the size in weight is not match.What should i do to solve the problem?
thanks!

@danielS91
Copy link
Member

You can map predictions that fall into the last 3 classes to void before computing the metric.
Another option would be to adapt the model and to strip the weights for the last convolution.

We follow the latter approach in our follow-up work:
https://github.com/TUI-NICR/EMSANet/blob/main/emsanet/weights.py#L69
However, note that we do this to load pretrained weight and perform another finetuning step subsequently.

@zhouqunbing
Copy link
Author

Thanks, your thought is the same as mine, i delete the last convolution,if i use the cliped weights to test the SUNRGBD directly, the mIoU is very low ,so i need to load the weight for finetuning to get a better results, right?

@zhouqunbing
Copy link
Author

meanwhile,if i train cityscape dataset,the loss,CrossEntropyLoss2d,should change the ignore_index from -1 to 255,right?.because the 255 is void.
image

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