xuebinqin/BASNet

The size of the input image required by the model training its own data

tongxiaozhong14 opened this issue · 6 comments

Dear Author:
Thank you for sharing the code. If I want to use your code to train my own data, is there any requirement for the size of the input training image?

Thanks for your interests. Currently, different size input may trigger some errors because the upsampling operations with factor of 2. To handle arbitrary input size, you can change the upsample functions as what we did in our new model U^2-Net:

upsample tensor 'src' to have the same spatial size with tensor 'tar'

def _upsample_like(src,tar):
src = F.upsample(src,size=tar.shape[2:],mode='bilinear')
return src