• Stars
    star
    220
  • Rank 180,422 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Towards Unified Keyframe Propagation Models

Guided Inpainting

teaser

Many video editing tasks such as rotoscoping or object removal require the propagation of context across frames. While transformers and other attention-based approaches that aggregate features globally have demonstrated great success at propagating object masks from keyframes to the whole video, they struggle to propagate high-frequency details such as textures faithfully. We hypothesize that this is due to an inherent bias of global attention towards low-frequency features. To overcome this limitation, we present a two-stream approach, where high-frequency features interact locally and low-frequency features interact globally. The global interaction stream remains robust in difficult situations such as large camera motions, where explicit alignment fails. The local interaction stream propagates high-frequency details through deformable feature aggregation and, informed by the global interaction stream, learns to detect and correct errors of the deformation field. We evaluate our two-stream approach for inpainting tasks, where experiments show that it improves both the propagation of features within a single frame as required for image inpainting, as well as their propagation from keyframes to target frames. Applied to video inpainting, our approach leads to 44% and 26% improvements in FID and LPIPS scores.

Towards Unified Keyframe Propagation Models
Patrick Esser, Peter Michael, Soumyadip Sengupta

comparison_small.mp4

Video results for all DAVIS sequences.

Requirements

conda env create -f env.yaml
conda activate guided-inpainting

Download the raft-things.pth checkpoint for RAFT and place into checkpoints/flow/raft/raft-things.pth.

Download the encoder_epch_20.pth checkpoint for the ade20k-resnet50dilated-ppm_deepsup perceptual loss of LaMa and place into checkpoints/lama/ade20k/ade20k-resnet50dilated-ppm_deepsup/encoder_epoch_20.pth.

Evaluation

To reproduce the results from Table 2, download the validation data to data/places365/lama/val_guided/. Download the desired pre-trained checkpoint(s) and run

python gi/main.py --base configs/<model>.yaml --gpus 0, --train false --resume_from_checkpoint models/<model>.ckpt

To reproduce the results in Table 3, set up the DEVIL benchmark, download the pre-computed results and run DEVIL on it. Note that at the moment we do not plan to release the propagation code.

Training

Follow the training split preparation of Places as in LaMa and place into data/places365/data_large. Start the training with

python gi/main.py --base configs/<model>.yaml --gpus 0,1

Shoutouts

More Repositories

1

stable-diffusion

Latent Text-to-Image Diffusion
Jupyter Notebook
3,267
star
2

RunwayML-for-Unity

RunwayML for Unity 🎯
C#
181
star
3

RunwayML-for-Photoshop

RunwayML for Photoshop
TypeScript
143
star
4

processing-library

RunwayML-for-Processing
Java
132
star
5

runway

[DEPRECATED ALPHA VERSION] Run, build and train machine learning models using a visual interface and then connect your models to your favorite software.
128
star
6

learn

πŸ‘©β€πŸ« Learn how to use RunwayML with tutorials, guides, and examples!
127
star
7

model-sdk

πŸ’₯🐍 Runway Model SDK: port your own machine learning models to Runway
Python
102
star
8

ofxRunway

RunwayML + openFrameworks β˜„οΈ
Makefile
101
star
9

touchDesigner

RunwayML + TouchDesigner 🌝
101
star
10

javascript

RunwayML + JavaScript πŸ‘Ύ
JavaScript
100
star
11

processing

[ARCHIVED] Runway + Processing πŸ”₯
Processing
95
star
12

p5js

RunwayML + p5.js 🐠
JavaScript
94
star
13

model-template

πŸŒοΈβ€β™‚οΈModel Template: Basic template structure of a Runway model.
Python
56
star
14

hosted-models

Interact with Runway Hosted Models with only a few lines of code!
TypeScript
55
star
15

unity

[ARCHIVED] Runway + Unity 🦚
C#
49
star
16

awssecret2env

Convert secrets stored in AWS Secrets Manager to environment variables
Go
48
star
17

maxmsp

RunwayML + Max/MSP 🐲
Max
45
star
18

Intro-Synthetic-Media

Introduction to Synthetic Media Class at ITP/NYU.
JavaScript
38
star
19

alpha_models

[ALPHA] Models for Runway
PureBasic
31
star
20

OpenRNDR

RunwayML + OpenRNDR πŸ¦€
Kotlin
24
star
21

arduino

RunwayML + Arduino 🦊
C++
24
star
22

RunwayML-for-Grasshopper

RunwayML for Grasshopper
C#
19
star
23

puredata

RunwayML + Pure Data 🦜
14
star
24

Arbitrary-Image-Stylization

Python
7
star
25

sdk-node

TypeScript
5
star
26

sdk-python

Python
4
star
27

design

Runway design resources
1
star