Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

ccvfi

codecov CI-test Release-pypi PyPI version GitHub

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)

Table of built distributions (wheels) for ccvfi 0.0.3
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page