Skip to main content

A Python package for video interpolation using deep learning.

Project description

📦 Saibyo — Deep Learning Video Frame Interpolation

PyPI Version Latest Release Coverage Python Version Linter Lint Status CI Status License: MIT

Saibyo Demo

⚠️ IMPORTANT: Above gif could not show the full potential of Saibyo fps boost, check out the video for a better understanding in the YouTube Demo.

📝 NOTE: It is important to mention that due to youtube restrictions, the maximum fps of a video is 60fps. Even do, you will be able to feel the difference in smoothness with higher fps videos.

📖 Overview

Saibyo[^1] is a deep learning video frame interpolation library built on top of RIFE and PyTorch, enabling fast FPS upscaling, slow-motion generation and visual comparison tools.

[^1]: The name comes from stylized Japanese components: Sai (彩 / 再), which can evoke “color,” “detail,” or “redo”; and Byō (描 / 秒), which can suggest “to draw” or even “second (fps).” Combined, Saibyo roughly conveys the idea of “redrawing the seconds,” which aligns perfectly with a system focused on frame interpolation and visual refinement.

What Saibyo offers:

  • Easy-to-use CLI and Python API for video frame interpolation.
  • Multiple configuration options: config files, environment variables, direct parameters.
  • Built-in comparison modes to visualize interpolation results.
  • Extensible architecture for future models and features.

🚀 Installation

Saibyo has been published to PyPI to facilitate easy installation. It can be installed using pip command:

pip install saibyo

📚 For more installation documentation, including optional dependencies and troubleshooting, check out the installation guide located at docs/installation.md

⚡ Quick Usage

There are two primary ways to use Saibyo: via the Command Line Interface (CLI) or through the Python API.

Command Line Interface (CLI)

Once Saibyo is installed, you can use the saibyo command in your terminal to interpolate a video. The basic syntax is as follows:

saibyo interpolate video.mp4 output_directory/

By default, the name of the output file will be {original_video_name}_x{fps_multiplier}_{new_fps}.mp4, where fps_multiplier is the factor by which the original FPS is increased.

📚 For more CLI options and usage examples, refer to the CLI documentation at docs/cli.md

Python API

Saibyo can also be integrated into Python scripts for more customized workflows. Here is a simple example of how to use the Python API to interpolate a video:

from saibyo.base.conf.app import configure
from saibyo.conf.conf import SaibyoConf
from saibyo.constants.app import APP_NAME, ROOT_DIR
from saibyo.core.interpolation.rife import RifeInterpolator

conf = configure(APP_NAME, ROOT_DIR, SaibyoConf)
Interpolator(conf).run(
    input_path=input_path,
    output_folder=output_folder,
)
Comparator(conf.comparator).compare(
    video_a=input_path,
    video_b=output_path,
    output_path="path/to/comparison_output.mp4"

📚 For more Python API options, refer to the Python API documentation docs/python-api.md and docs/comparison-modes.md

⚙️ Configuration

By default, Saibyo uses parameters preset in the Pydantic configuration schemas located in saibyo/conf/conf.py. These parameters can be overridden using:

  • Environment variables.
  • Setting values directly to SaibyoConf instance.

📚 For more detailed configuration options, refer to the configuration documentation at docs/configuration.md

🎨 Comparison Modes

Saibyo includes built-in comparison utilities, allowing users to visualize the differences between the original and interpolated videos. The available comparison modes are:

  • side_by_side
  • top_bottom
  • split_half_vertical
  • split_half_horizontal

📚 For more detailed comparison mode options and how to run this command, refer to the comparison modes documentation at docs/comparison-modes.md

🗺️ Roadmap

Planned features and improvements for future releases include:

ONNX inference

Actually, Saibyo uses PyTorch for model inference, that makes it less portable to other platforms, more resource-demanding and harder to deploy in cloud environments. ONNX is an open format built to represent machine learning models, that allows models to be used across different frameworks and platforms. This feature will enable:

  • Lighter models.
  • Easier deployment.
  • Broader compatibility.

Batching support

Currently, Saibyo processes videos taking one pair of frames at a time, which can be inefficient for longer videos or higher resolutions. Batching support will allow the processing of multiple frame pairs simultaneously, leading to:

  • Improved performance.
  • Reduced processing time.
  • Better resource utilization.

Advanced ML models (IFRNet, FLAVR)

Expanding the range of supported machine learning models for frame interpolation will provide users with more options to choose from, depending on their specific needs and preferences. This will include:

  • Integration of state-of-the-art models like IFRNet and FLAVR.
  • Enhanced interpolation quality.
  • More customization options for users.

Output video compression

To optimize storage space and improve video playback performance, Saibyo will introduce options for compressing output videos without significant loss of quality. This feature will offer:

  • Various compression algorithms.
  • User-defined quality settings.
  • Reduced file sizes.

📄 License

Saibyo is licensed under the MIT License. See the LICENSE file for more information.

👤 Author emoji

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saibyo-0.12.1.tar.gz (22.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saibyo-0.12.1-py3-none-any.whl (22.9 MB view details)

Uploaded Python 3

File details

Details for the file saibyo-0.12.1.tar.gz.

File metadata

  • Download URL: saibyo-0.12.1.tar.gz
  • Upload date:
  • Size: 22.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for saibyo-0.12.1.tar.gz
Algorithm Hash digest
SHA256 26d657316ff96104edb5b3fa3bc3a5a951f70dccee46d714e6c32d59e9a32ad1
MD5 c7504a37089caa5e4b84e70285b4b3d0
BLAKE2b-256 99cc2b7fa45edffe19d7d65429a2a9fd0b01fa309d009380a2be7045f6c6de96

See more details on using hashes here.

File details

Details for the file saibyo-0.12.1-py3-none-any.whl.

File metadata

  • Download URL: saibyo-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 22.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for saibyo-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5565d7a82241b410dd0b5f7b577def3e19095b2f7802f0a1b78a9aded8a47f2
MD5 f4f728e8e068b9077a29eee03915929f
BLAKE2b-256 a6c4f3789a0fdeab04b9b7bb8ef68e867a155f64c3d5a25d524a4562ce560cd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page