ZHKKKe / MODNet

A Trimap-Free Portrait Matting Solution in Real Time [AAAI 2022]
Apache License 2.0
3.83k stars 637 forks source link

Inference time too slow on single #172

Open jcelsi opened 2 years ago

jcelsi commented 2 years ago

I’m trying to use MODNet on a single 640x640 image and producing the alpha takes approximately 0.8 seconds using the demo code. I wanted to know if I can get faster results, ideally under 0.03 seconds. I’m using RTX 3090.

ZHKKKe commented 2 years ago

Hi, thanks for your attention. There may be two possible problems: (1) It seems you run the model on CPU. Please check it. If you use RTX3090, the speed should be much more faster (higher than 60fps). (2) The first inference after model initialization may be slow. Please measure the inference time from the second forword.

xiaoyaogaobin commented 1 year ago

我尝试在单个 640x640 图像上使用 MODNet,并使用演示代码生成 alpha 大约需要 0.8 秒。我想知道是否可以获得更快的结果,最好是在 0.03 秒以内。我用的是RTX 3090。

你好你用的这个模型是多大啊