Skip to content

SunInHeart/TAE-MVFI

Repository files navigation

TAE-MVFI

本仓库是《基于Transformer和增强可变形可分离卷积的多视频插帧方法》的论文代码

依赖包

以下为运行代码所需要的依赖:

  • python==3.7.6
  • pytorch==1.5.1
  • cudatoolkit==10.1
  • torchvision==0.6.1
  • cupy==7.5.0
  • pillow==8.2.0
  • einops==0.3.0
  • opencv-python
  • timm
  • tqdm

涉及数据集

  1. Vimeo90K Triplet dataset
  2. Vimeo90K Septuplet dataset
  3. UCF101 dataset
  4. DAVIS dataset

预训练模型

Baidu Cloud: kele

单帧插值

训练

python main.py --model TAE_MVFI_s --dataset vimeo90K_triplet --data_root <dataset_path> --batch_size 8 --num_workers 32

测试

  1. Vimeo90K triplet
python test.py --model TAE_MVFI_s --dataset vimeo90K_triplet --data_root <dataset_path> --load_from checkpoints/TAE_MVFI_s/model_best.pth
  1. UCF101
python test.py --model TAE_MVFI_s --dataset ucf101 --data_root <dataset_path> --load_from checkpoints/TAE_MVFI_s/model_best.pth
  1. DAVIS
python test.py --model TAE_MVFI_s --dataset Davis --data_root <dataset_path> --load_from checkpoints/TAE_MVFI_s/model_best.pth

插帧

  1. 单次插值:
python interpolate_demo.py --model TAE_MVFI_s --load_from checkpoints/TAE_MVFI_s/model_best.pth
  1. 多次插值:
python interpolate_demo1.py --model TAE_MVFI_s --load_from checkpoints/TAE_MVFI_s/model_best.pth

多帧插值

训练

python main.py --model TAE_MVFI_m --dataset vimeo90K_septuplet --data_root <dataset_path> --batch_size 8 --num_workers 32

测试

  1. Vimeo90K septuplet
python test.py --model TAE_MVFI_m --dataset vimeo90K_septuplet --data_root <dataset_path> --load_from checkpoints/TAE_MVFI_m/model_best.pth
  1. UCF101
python test.py --model TAE_MVFI_m --dataset ucf101 --data_root <dataset_path> --load_from checkpoints/TAE_MVFI_m/model_best.pth
  1. DAVIS
python test.py --model TAE_MVFI_m --dataset Davis --data_root <dataset_path> --load_from checkpoints/TAE_MVFI_m/model_best.pth

插帧

  1. 指定插值中间帧的数量:
python interpolate_demo1.py --model TAE_MVFI_m --load_from checkpoints/TAE_MVFI_m/model_best.pth --inter_num 5
  1. 指定插值中间帧对应的时间步:
python interpolate_demo2.py --model TAE_MVFI_m --load_from checkpoints/TAE_MVFI_m/model_best.pth --times 0.1,0.3,0.5,0.7,0.9

参考资料

本论文代码借鉴了以下论文开源代码,在此致谢:

  • VFIT: Video Frame Interpolation Transformer, CVPR 2022 Code
  • VFIformer: Video Frame Interpolation with Transformer, CVPR 2022 Code
  • EDSC: Multiple Video Frame Interpolation via Enhanced Deformable Separable Convolution, TPAMI 2021 Code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages