Open Sunbaoquan opened 2 years ago
@MeowZheng
你好,再跟您请教一下,是在test pipeline中的dict(type='Resize', keep_ratio=True)
后添加字段dict(type='ResizeToMultiple')
吗?这样子可以理解为最大程度上降低:我自己的模型不能输入等比缩放后的图像(因为高和宽不是32的整数倍),需要在经过一步resize;而baseline是直接输入等比缩放的图像,这两者直接的偏差?最终的MIoU的计算是在原图像尺寸上进行的对吧?
期待您的回复,谢谢~ @MeowZheng
I found that the backbone network I designed can only input image sizes that are integer multiples of 32. In the Pascal-context training pipeline, the image and label are cropped and pad to 512x512. However, in the test pipeline, I set
img_scale=(512, 512)
, and sincekeep_ratio=True
in resize(), the short edge of the test image is not necessarily an integer multiple of 32 at this point. I tried two solutions.keep_ratio=False
and resize the image to 512x512 size directly in the test pipeline, but this may destroy the original image structure. 2, add a newdict(type='Pad', size_divisor=32, pad_val=0, seg_pad_val=255)
in the test pipeline to fill the short edge to an integer multiple of 32 to guarantee the original image structure. The structure of the two tests is not the same, how exactly should I handle this situation?Also, the annotation label is not involved in the processing within the val pipeline, right? When calculating MIoU, is the prediction of the model resized to the original label size according to mmseg?
I am new to the field and look forward to your answers.