Friday, 31 December 2021

Pixellib - removing background takes huge processing

Am using Pixellib library in python to detect a person and change its background, as shown in their example here: https://pixellib.readthedocs.io/en/latest/change_image_bg.html

It works flawlessly, but takes huge processing power on my laptop, coupled with their large (~150mb) pascalvoc model, thus rendering an image in approx 4-5sec.

I need to be able to do the same via a mobile phone app, so certainly this cannot be run on a user's mobile. Alternative is to run this on cloud and return the processed image back. This is both costly if user requests increase and will still have noticable lag on user's app.

So, how do achieve this? Apps like Canva Pro (https://www.canva.com/pro/background-remover/) seem to do this seamlessly in an app fairly quickly (https://static-cse.canva.com/video/753559/02_CANVA_ProFeatures_BackgroundRemover.mp4). Infact, there are many other 'free' apps on Play store claiming to do the same.

Thus, is there a better way to run Pixellib, to make it more performant? Or any other library that can provide similar (or better) ouptut and can be run on user's mobile?

Thanks



from Pixellib - removing background takes huge processing

No comments:

Post a Comment