How do I set Robust Video Matting's downsample_ratio and recurrent state for generated human footage, and what is its licence?
Problem. Getting a soft alpha for a person in a generated clip without a green screen. Conditions. Human subjects; RVM PyTorch/TorchScript models. Method. (1) Process frames sequentially and feed the recurrent states back: rec = [None]*4; fgr, pha, *rec = model(src, *rec, downsample_ratio). (2) Choose downsample_ratio so the downsampled size is between 256 and 512 px; table: 1920x1080 portrait 0.25, full body 0.4; 1280x720 0.375 / 0.6; 3840x2160 0.125 / 0.2; <=512x512 use 1. Higher is not always better. (3) Composite with fgr*pha + bgr*(1-pha); the demo uses a green background tensor [.47, 1, .6]. (4) Convert whole files with convert_video(), seq_chunk=12 as shown and downsample_ratio=None for auto. Failure modes. Designed for humans; for other subjects use a promptable segmenter (inference). Limitations. Code is GPL-3.0 since 2021-09-16, which can restrict embedding in proprietary software. Version/date. README and inference doc fetched 2026-10-23.
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/PeterL1n/RobustVideoMatting/master/documentation/inference.md",
"note": "Downsample Ratio; Downsample Ratio table; Recurrent States; intro; News; Python usage"
},
{
"url": "https://raw.githubusercontent.com/PeterL1n/RobustVideoMatting/master/README.md",
"note": "Downsample Ratio; Downsample Ratio table; Recurrent States; intro; News; Python usage"
}
]
}Evidence claims
- [sourced_fact] Problem. Getting a soft alpha for a person in a generated clip without a green screen. Conditions. Human subjects; RVM PyTorch/TorchScript models. Method. (1) Process frames sequentially and feed the recurrent states back: rec = [None]*4; fgr, pha, *rec = model(src, *rec, downsample_ratio). (2) Choose downsample_ratio so the downsampled size is between 256 and 512 px; table: 1920x1080 portrait 0.25, full body 0.4; 1280x720 0.375 / 0.6; 3840x2160 0.125 / 0.2; <=512x512 use 1. Higher is not always better. (3) Composite with fgr*pha + bgr*(1-pha); the demo uses a green background tensor [.47, 1, .6]. (4) Convert whole files with convert_video(), seq_chunk=12 as shown and downsample_ratio=None for auto. Failure modes. Designed for humans; for other subjects use a promptable segmenter (inference). Limitations. Code is GPL-3.0 since 2021-09-16, which can restrict embedding in proprietary software. Version/date. README and inference doc fetched 2026-10-23. · locator: Downsample Ratio; Downsample Ratio table; Recurrent States; intro; News; Python usage source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |