Skip to main content

A Python package for video interpolation using deep learning.

Project description

Saibyo Logo

Saibyo Logo Dark

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

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.14.0.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.14.0-py3-none-any.whl (22.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: saibyo-0.14.0.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.14.0.tar.gz
Algorithm Hash digest
SHA256 b5bcd54da7efd271b5850f7d56360fe325f680db57ce3cac24c39eef4ea94f08
MD5 5fdd39faad1d960280942abb0832faeb
BLAKE2b-256 1f9ec2a3168b8fd8ee1c50fb25ba94cd8008a2f530db1e222994d728f46efd0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: saibyo-0.14.0-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.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7986a937640a717d987dbd79567975aa5b48d77d24dbcb9b589167d98e51512
MD5 db991c7058c6c9aeab2be9648051a9b0
BLAKE2b-256 21fb6b36984e62332507e56447d60c5f105847b22ae1fcab639d818c996de6f4

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