fgr, pha, *rec = model(src.cuda(), *rec, downsample_ratio=0.25) # Cycle the recurrent states.
writer.write(fgr * pha + bgr * (1 - pha))
writer.close()
```
Or you can use the provided video converter:
@ -349,4 +350,4 @@ for src in YOUR_VIDEO: # src is PIL.Image.
```
Our CoreML models only support fixed resolutions. If you need other resolutions, you can export them yourself. See [coreml branch](https://github.com/PeterL1n/RobustVideoMatting/tree/coreml) for model export.
Our CoreML models only support fixed resolutions. If you need other resolutions, you can export them yourself. See [coreml branch](https://github.com/PeterL1n/RobustVideoMatting/tree/coreml) for model export.