PeterL1n / BackgroundMattingV2

Real-Time High-Resolution Background Matting
MIT License
6.81k stars 950 forks source link

What settings do I change to make the inference_video.py more sensitive to shadows? (COM ) #95

Closed Arudrin closed 3 years ago

Arudrin commented 3 years ago

Or simply improve results overall. Mobilenet backbone and model seems to work best but Id still like to improve on it more.

Here is the background image: vlcsnap-2021-05-12-19h54m33s456

A frame of the source video: src

Frames of the result: There are frames where the background is not completely replaced com1 com2

python command:

python inference_video.py \ --model-type mattingrefine \ --model-backbone mobilenetv2 \ --model-backbone-scale 0.25 \ --model-refine-mode sampling \ --model-refine-sample-pixels 80000 \ --model-checkpoint "path" \ --video-src "xpath" \ --video-bgr "ypath" \ --video-resize 1920 1080 \ --output-dir "zpath" \ --output-type com

PeterL1n commented 3 years ago

I don't have any tricks that can help besides avoiding the shadow at its first place. Every method has its limitations. Shadow will cause problems even for green screen matting.

Arudrin commented 3 years ago

ok thank you very much!