Home

Awesome

Spectral-Motion-Alignment

This repository is the official implementation of SMA.<br> SMA: Spectral Motion Alignment for Video Motion Transfer using Diffusion Models. <br> Geon Yeong Park*, Hyeonho Jeong*, Sang Wan Lee, Jong Chul Ye

Project Website arXiv

<p align="center"> <img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/images/SMA_model.png" width="100%"/> <br> <em>SMA framework distills the motion information in frequency-domain. Our regularization includes (1) global motion alignment based on 1D wavelet-transform, and (2) local motion refinement based on 2D Fourier transform. </em> </p>

News

Setup

Requirements

For the preliminary proof of concepts, this repository is build upon VMC (w/ Show-1 backbone).

(1) Install VMC requirements

pip install -r requirements.txt

(2) Install wavelet libraries

git clone https://github.com/fbcotter/pytorch_wavelets
cd pytorch_wavelets
pip install .
pip install PyWavelets

Usage

The following command will run "train & inference" at the same time:

accelerate launch train_inference.py --config configs/man_skate.yml

Additional Data

We benefit from video dataset released by VMC.

Results

<table class="center"> <tr> <td style="text-align:center;"><b>Input Videos</b></td> <td style="text-align:center;" colspan="1"><b>Output Videos</b></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/long/penguins_swimming2/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/long/penguins_swimming2/shark.gif"></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/demo/man_skate/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/demo/man_skate/astronaut_snow.gif"></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/cars_bridge1/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/cars_bridge1/with/turtle.gif"></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/rabbit_strawberry/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/rabbit_strawberry/with/raccoon_nuts.gif"></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/penguins_swimming1/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/penguins_swimming1/with/spaceships_space.gif"></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/butterfly/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/vmc_show1/butterfly/with/snow.gif"></td> </tr> </table>

More results (w/ MotionDirector)

<table class="center"> <tr> <td style="text-align:center;"><b>Input Videos</b></td> <td style="text-align:center;" colspan="1"><b>Output Videos</b></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/motiondirector/seagull_walking/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/motiondirector/seagull_walking/with/chicken.gif"></td> </tr> <tr> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/motiondirector/seagull_skyline/input.gif"></td> <td><img src="https://geonyeong-park.github.io/spectral-motion-alignment/static/gifs/motiondirector/seagull_skyline/with/eagle.gif"></td> </tr> </table>

Hyperparameters

Most configurations follows VMC.

Citation

If you make use of our work, please cite our paper.

@article{park2024spectral,
  title={Spectral Motion Alignment for Video Motion Transfer using Diffusion Models},
  author={Park, Geon Yeong and Jeong, Hyeonho and Lee, Sang Wan and Ye, Jong Chul},
  journal={arXiv preprint arXiv:2403.15249},
  year={2024}
}

Shoutouts