ESANet
ESANet copied to clipboard
NYUV2 weight test SUNRGBD
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!
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.
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?
meanwhile,if i train cityscape dataset,the loss,CrossEntropyLoss2d,should change the ignore_index from -1 to 255,right?.because the 255 is void.