PeterL1n / BackgroundMattingV2

Real-Time High-Resolution Background Matting
MIT License
6.81k stars 950 forks source link

Image size for training #175

Closed yataoz closed 2 years ago

yataoz commented 2 years ago

Hi,

Thanks for sharing the code.

I noticed that the you use PairRandomAffineAndResize() during training to make images 512x512. In the paper, you mentioned that "We randomly crop the images in every minibatch so that the height and width are each uniformly distributed between 1024 and 2048".

So I was wondering which cropping/resizing mechanism was used for the released model? Any insight on different choices of image sizes? Does 512x512 produce better results?

yataoz commented 2 years ago

Ah, just figured out that high resolution crop/resize is in train_refine.py. I was looking at train_base.py. Nvm, problem solved.