anilsathyan7 / Portrait-Segmentation

Real-time portrait segmentation for mobile devices
MIT License
638 stars 133 forks source link

Removing background for 480p (wide) video instead of square #30

Open kooler opened 3 years ago

kooler commented 3 years ago

Hi,

It seems that all the models are currently receiving square images as the input. In order to make them work with wider ones (for example 320x240) would I need to retrain them on images of that size or is there another way to adapt them to the different size?

Thanks!

anilsathyan7 commented 3 years ago

You can resize the input image to square (say 320x320), feed the resized image as input to the model and finally resize the output mask to required resolution.

kooler commented 3 years ago

Ah, interesting, will give it a try.

Thanks @anilsathyan7!