PeterL1n / RobustVideoMatting

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

Is it possible to export the Foreground Prediction? #225

Open SamDot37 opened 1 year ago

SamDot37 commented 1 year ago

I might be missing something but is it possible to export the Foreground Prediction as shown in the Recurrent States Visualization - Video?

gdamms commented 1 year ago

When you run inference.py with the --help option, you can read this line:

--output-foreground OUTPUT_FOREGROUND

If you use this option, it will generate the video you are looking for. This video made of the output fgr of the model inference.

Keep in mind that not all video format handle transparency. You should consider using a format that does or do the things you want with fgr yourself.