PeterL1n / RobustVideoMatting

Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!
https://peterl1n.github.io/RobustVideoMatting/
GNU General Public License v3.0
8.61k stars 1.14k forks source link

Difference of fgr output and src input #93

Closed livingbeams closed 3 years ago

livingbeams commented 3 years ago

This is perhaps more a question about the network design than the code, sorry if this is not the right channel to ask this.

I wonder what is the difference between the fgr output and the src input image in those pixels belonging to the matting mask (pha> 0).

I supposed that maybe they could refine the edges of the matting where pha <1.0, but representing side by side a matting where the alpha that delivers the network is applied on the original image together with another where it is applied on the fgr output I can not see any difference .

Would it be possible to reduce somewhat the computational cost of the network by eliminating the fgr output?

Best regards.

PeterL1n commented 3 years ago

Read https://github.com/PeterL1n/RobustVideoMatting/issues/42 for why predict foreground.

I think foreground prediction could be very useful for fast waving hands etc. Do whatever you like for training your own model.