This project has been archived by its maintainers, and is no longer receiving any updates.
ccvfi
an inference lib for video frame interpolation with VapourSynth support
Install
Make sure you have Python >= 3.9 and PyTorch >= 1.13 installed
pip install ccvfi
- Install VapourSynth (optional)
Start
cv2
a simple example to use the RIFE (ECCV2022-RIFE) model to process an image sequence.
import cv2
import numpy as np
from ccvfi import AutoModel, ConfigType, VFIBaseModel
model: VFIBaseModel = AutoModel.from_pretrained(
pretrained_model_name=ConfigType.RIFE_IFNet_v426_heavy,
)
img0 = cv2.imdecode(np.fromfile("01.jpg", dtype=np.uint8), cv2.IMREAD_COLOR)
img1 = cv2.imdecode(np.fromfile("02.jpg", dtype=np.uint8), cv2.IMREAD_COLOR)
out = model.inference_image_list(img_list=[img0, img1])[0]
cv2.imwrite("test_out.jpg", out)
VapourSynth
a simple example to use the VFI (Video Frame-Interpolation) model to process a video (DRBA)
import vapoursynth as vs
from vapoursynth import core
from ccvfi import AutoModel, BaseModelInterface, ConfigType
model: BaseModelInterface = AutoModel.from_pretrained(
pretrained_model_name=ConfigType.DRBA_IFNet,
)
clip = core.bs.VideoSource(source="s.mp4")
clip = core.resize.Bicubic(clip=clip, matrix_in_s="709", format=vs.RGBH)
clip = model.inference_video(clip, tar_fps=60)
clip = core.resize.Bicubic(clip=clip, matrix_s="709", format=vs.YUV420P16)
clip.set_output()
See more examples in the example directory, ccvfi can register custom configurations and models to extend the functionality
Current Support
It still in development, the following models are supported:
Reference
License
This project is licensed under the MIT - see the LICENSE file for details.
Metadata
Release files for ccvfi 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ccvfi-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / ccvfi-0.0.3-py3-none-any.whl
| Download URL | ccvfi-0.0.3-py3-none-any.whl |
|---|---|
| Size | 34.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
011289c3e4581e5ac1bf4d791fcd9e5bc135fc9d788f3fefed4340eade7b2ab0
|
|
BLAKE2b-256 checksum How to use checksums |
be8eeff8c91633977c325f741a169cbac45af8913c1cc286b0da51581e9cf581
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|