PeterL1n / BackgroundMattingV2

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

4K settings as suggested by PeterL1n gives worst result. #145

Closed BracerJack closed 3 years ago

BracerJack commented 3 years ago

Default Setting: python inference_video.py --model-type mattingrefine --model-backbone resnet50 --model-checkpoint ./model/PyTorch/pytorch_resnet50.pth --model-refine-sample-pixels 320_000 --video-src ./input/Raw.avi --video-bgr ./input/Empty_Background.png --output-dir ./output --output-types com fgr pha err ref

4K Setting: python inference_video.py --model-type mattingrefine --model-backbone resnet50 --model-checkpoint ./model/PyTorch/pytorch_resnet50.pth --model-backbone-scale 0.125 --model-refine-sample-pixels 320_000 --video-src ./input/Raw.avi --video-bgr ./input/Empty_Background.png --output-dir ./output --output-types com fgr pha err ref

Footage is 4K, the 4K settings makes the 4K cutout looks worst in some area [not all], what is the correct arguments for 4K settings to make full use of all those extra pixel information ?

Can you help to modify the 4k arguments presented here to make them better ?

git

PeterL1n commented 3 years ago

Feel free to use whatever argument that suits your footage. They trade-off between speed and quality.

BracerJack commented 3 years ago

What if I don't care about speed and I want full on quality for the 4K footage ? What can I change in the argument to make it focus solely on quality ? Thanks :D

PeterL1n commented 3 years ago

In general, you can set model-refine-sample-pixels to be higher the better, but model-backbone-scale needs to be tuned on a case-by-case basis.