import os os.system("git clone https://github.com/google-research/frame-interpolation") import sys sys.path.append("frame-interpolation") import cv2 import numpy as np import tensorflow as tf import mediapy from PIL import Image from eval import interpolator, util import gradio as gr from huggingface_hub import snapshot_download from image_tools.sizes import resize_and_crop from moviepy.editor import * model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style") interpolator = interpolator.Interpolator(model, None) ffmpeg_path = util.get_ffmpeg_path() mediapy.set_ffmpeg(ffmpeg_path) def interpolate(frame1, frame2, times_to_interpolate): input_frames = [frame1, frame2] frames = list( util.interpolate_recursively_from_files( input_frames, times_to_interpolate, interpolator)) print(frames) return "done" title="sketch-frame-interpolation" description="

This is a fork of the Gradio demo for FILM: Frame Interpolation for Large Scene Motion from @akhaliq, but using sketches instead of images. This could be very useful for the animation industry :)
To use it, simply draw your sketches and add the times to interpolate number. Read more at the links below.
visitor badge

" article = "

FILM: Frame Interpolation for Large Motion | Github Repo

" custom_css = "style.css" gr.Interface(interpolate,[gr.Image(source="upload", type="filepath"),gr.Image(source="upload", type="filepath"),2],outputs=[gr.Textbox()],title=title,description=description,article=article,css=custom_css).launch(enable_queue=True)