NVlabs / SegFormer

Official PyTorch implementation of SegFormer
https://arxiv.org/abs/2105.15203
Other
2.58k stars 357 forks source link

Inference resolution size #58

Open ashutosh1807 opened 3 years ago

ashutosh1807 commented 3 years ago

The paper specifies that the decoder outputs the segmentation map at h/4*w/4. Is it then upsampled? Can you pinpoint me to the code where it is done?

JunpuWang-sub commented 2 years ago

I have the same question.

wllmzhu commented 2 years ago

Indeed it is upsampled to the original image resolution before calculating the loss. I found the author's response here in another issue, specifically in bullet point 2.

I believe the line that does the upsampling is here in encoder_decoder.py