ESANet icon indicating copy to clipboard operation
ESANet copied to clipboard

NYUV2 weight test SUNRGBD

Open zhouqunbing opened this issue 1 year ago • 3 comments

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!

zhouqunbing avatar Apr 14 '23 02:04 zhouqunbing

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.

danielS91 avatar Apr 20 '23 14:04 danielS91

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 avatar Apr 23 '23 04:04 zhouqunbing

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

zhouqunbing avatar Apr 23 '23 04:04 zhouqunbing