TUI-NICR / ESANet

ESANet: Efficient RGB-D Semantic Segmentation for Indoor Scene Analysis
Other
231 stars 49 forks source link

NYUV2 weight test SUNRGBD #55

Open zhouqunbing opened 1 year ago

zhouqunbing commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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