-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image size differece between training and testing #76
Comments
If adopting the whole images to train the network, the batchsize is too small, e.g. 1 images/gpu, which has a negative influence on BN and makes the training unstable. I think that DANet use the sliding inference in the process of testing not training. |
Thank you for answering my question. Maybe I could not express what I want to say exactly. You are correct about the pipeline of DANet. Do you have any knowledge around here ? |
Sliding method is often used in image processing, such as image de-blocking and deblur, and leads to better performance. It crops the images into many overlapped patches, which also increasing the inference timecost. HRNet with multi-scale testing (including sliding process) can improve 1%~1.5% on mIoU. I have no idea why there is 5% performance gap. It's too large. I'm not sure whether the architecture results in this problem. You can try other network, HRNet or PSPNet. If you want to reduce testing time, you can concatenate the cropped image patches at the batchisze axis. |
Accumulating images to batchsize axis is great idea for me. I compared my code with your one and found a difference. After sharing my update, I will close this issue. |
Thank you for providing nice repostiroy.
I'd like to ask about image size during training and testing on cityscapes dataset.
For cityscapes training, you use (512, 1024) size of cropped image.
In the single scale testing, however, inference has been done for whole image size, i.e. (1024, 2048).
I found some works employ sliding inference with cropsize during training.
(https://github.com/junfu1115/DANet/blob/master/encoding/models/base.py#L78-L179)
So, my questions are;
Thanks.
The text was updated successfully, but these errors were encountered: