speedinghzl / pytorch-segmentation-toolbox

PyTorch Implementations for DeeplabV3 and PSPNet
MIT License
772 stars 167 forks source link

About the output stride of deeplabv3 #18

Closed rui1996 closed 5 years ago

rui1996 commented 5 years ago

Thank you for your amazing repo!

However, as mentioned in the deeplabv3 paper, the training output stride is 16 and for inference, the os = 8. Will you support this in future? (Actually I'm not sure how they do this).

speedinghzl commented 5 years ago

@rui1996 Thanks for your attention. I don't have a plan to support this feature. In Deeplabv3, they train with stride 16 and test with stride 8 to increase batch size for getting reasonable statistics in BN. However, this repo integrates Sync BN, which makes it possible to train with stride 8 and a large batch size synchronously.

rui1996 commented 5 years ago

Thank you for you reply. But do you know what's the difference between the network on os=16 and os=8? Which part of the ResNet101 is modified? Is the stride changed or dilation rate changed?

speedinghzl commented 5 years ago

OS 16 -> OS 8 needs to change the last convolution with stride 2 to stride 1 and increase (x2) the dilation rates of subsequent convolution layers.