Skip to content

create smooth FPV drone, game, low fps video using frame blending powered by Pytorch which runs on Mac, Win, Linux

License

Notifications You must be signed in to change notification settings

eisneim/motion_blur_pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

motion_blur_pytorch

Create smooth FPV drone footage, game recordings, or low-FPS videos using frame blending powered by PyTorch. Runs on Mac, Windows, and Linux.

Why?:

  • repos like f0e/blur and smoothie can only run on Windows
  • frame interpolation method used in those project can not interpolate large motions, and will produce artifacts

How?

  • leveraging VFI advancements in recent years, we can improve the quality of frame interpolation by using the latest deep learning models like:

results

Before(24fps) After(24fps)
1-before.mp4
1-after.mp4

insallation

  • A fast GPU is required on linux and windows, for Mac you need to use M1~ M4 series chip with at least 32G RAM
  • first, install pytorch follow the offical guide: guide
  • install dependencies: pip install -r requirements.txt

AMT

download pretraind AMT-L model google drive or 百度网盘 password: iihx

edit file blur_amt.py

# change the path to your downloaded file
amt_model_path = "/Users/teli/www/ml/frame_interpolation/AMT/_pretrained/amt-l.pth"

process a folder with videos inside

python blur_amt.py -o output_folder_path input_folder_that_has_mp4_files/ 

process multi video files

python blur_amt.py -o output_folder_path path/to/a.mp4 path/to/b.mp4 path/to/c.mp4

FILM (a bit slow)

download pretraind FILM model google drive or 百度网盘 password: 8pxu

edit file blur_film.py

DEVICE = "mps" # cuda, mps
# change the path to your downloaded file
film_model_path = "/Users/teli/www/ml/frame_interpolation/frame-interpolation-pytorch-main/pretrained/film_fp16.pt"

process a folder with videos inside

python blur_film.py -o output_folder_path input_folder_that_has_mp4_files/ 

process multi video files

python blur_film.py -o output_folder_path path/to/a.mp4 path/to/b.mp4 path/to/c.mp4

TODO

  • add more models

Limitations

  • whithout quantization and other tricks, current implementation is slow
  • requires a lot ram to run

About

create smooth FPV drone, game, low fps video using frame blending powered by Pytorch which runs on Mac, Win, Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published