This is the official repository of DeMFI (Deep Joint Deblurring and Multi-Frame Interpolation).
[ArXiv_ver.] [ECCV2022_ver.] [Supp.] [Demo] [Poster] [Video5mins(YouTube)]
Last Update: 10 JULY 2022 - This work has been accepted to ECCV2022, we have uploaded a camera ready version (ECCV format) and a supplementary material in above links. Please note that the overall architecture and main experiments are same as the initial arxiv version.
Jihyong Oh and Munchurl Kim "DeMFI: Deep Joint Deblurring and Multi-Frame Interpolation with Flow-Guided Attentive Correlation and Recursive Boosting", European Conference on Computer Vision, 2022.
BibTeX
@inproceedings{Oh2022DeMFI,
title={DeMFI: Deep Joint Deblurring and Multi-Frame Interpolation with Flow-Guided Attentive Correlation and Recursive Boosting},
author={Oh, Jihyong and Kim, Munchurl},
booktitle={European Conference on Computer Vision (ECCV)},
year={2022}
}
If you find this repository useful, please consider citing our paper.
Examples of the Demo (x8 Multi-Frame Interpolation) videos (240fps) interpolated from blurry videos (30fps)
The 30fps blurry input frames are interpolated to be 240fps sharp frames. All results are encoded at 30fps to be played as x8 slow motion and spatially down-scaled due to the limit of file sizes. Please watch the full versions of them with this demo including additional scenes.
- Requirements
- Test
- Test_Custom
- Training
- Collection_of_Visual_Results
- Visualizations
- Arbitrary_M
- Contact
Our code is implemented using PyTorch1.7, and was tested under the following setting:
- Python 3.7
- PyTorch 1.7.1
- CUDA 10.2
- cuDNN 7.6.5
- NVIDIA TITAN RTX GPU
- Ubuntu 16.04 LTS
Caution: since there is "align_corners=True" option in "nn.functional.interpolate" and "nn.functional.grid_sample" in PyTorch1.7, we recommend you to follow our settings. Especially, if you use the other PyTorch versions, it may lead to yield a different performance.
Quick Start for Evaluations on Test Datasets (Deblurring and Multi-Frame Interpolation (x8) as in Table 2)
- Download the source codes in a directory of your choice <source_path>.
- We follow a blurry formation setting from BIN (Blurry Video Frame Interpolation) by averaging 11 consecutive frames at a stride of 8 frames over time to synthesize blurry frames captured by a long exposure, which finally generates blurry frames of 30fps with K = 8 and τ = 5 in Eq. 1.
- Download datasets from the dropbox links; Adobe240 (main, split1, split2, split3, split4) (split zip files, 49.7GB), GoPro(HD) (14.4GB). Since the copyrights for diverse videos of YouTube240 belong to each creator, we appreciate your understanding that it cannot be distributed. Original copyrights for Adobe240 and GoPro are provided via link1 and link2, respectively.
- Directory formats seem like below:
DeMFI
└── Datasets
├──── Adobe_240fps_blur
├──── test
├──── 720p_240fps_1
├──── 00001.png
├──── ...
└──── 00742.png
...
├──── IMG_0183
├──── test_blur
├──── ...
├──── train
├──── ...
├──── train_blur
├──── ...
- Download the pre-trained weight of DeMFI-Netrb(5,Ntst), which was trained by Adobe240, from this link to place in <source_path>/checkpoint_dir/DeMFInet_exp1.
DeMFI
└── checkpoint_dir
└── DeMFInet_exp1
├── DeMFInet_exp1_latest.pt
- Run main.py with the following options in parse_args:
# For evaluating on Adobe240
python main.py --gpu 0 --phase 'test' --exp_num 1 --test_data_path './Datasets/Adobe_240fps_blur' --N_tst 3 --multiple_MFI 8
# For evaluating on GoPro(HD)
python main.py --gpu 0 --phase 'test' --exp_num 1 --test_data_path './Datasets/GoPro_blur' --N_tst 3 --multiple_MFI 8
- The quantitative comparisons (Table2) and PSNR profiles for multi-frame interpolation results (Fig.5) are attached as belows for a reference.
- After running with the above test option, you can get the sharp frames in <source_path>/test_img_dir/DeMFInet_exp1/epoch_07499_final_x8_full_resolution_Ntst3, then obtain the PSNR/SSIM results per each time index in the screen.
- Our proposed DeMFI-Net we can properly regulate '--N_tst' by considering Rt (runtime) or computational constraints, even though the training with Ntrn is once over. Further details are described in the main paper.
- You can only get Multi-Frame Interpolation (x M) result by regulating '--multiple' as 2 or 8 for evaluation but any M can be chosen for 'test_custom' option, please refer Test_Custom.
Quick Start for your own blurry video data ('--custom_path') for any Multi-Frame Interpolation (x M)
- Download the source codes in a directory of your choice <source_path>.
- First prepare your own blurry videos in '.png' format in <source_path>/custom_path by following a hierarchy as belows:
DeMFI
└── custom_path
├── scene1
├── 'xxx.png'
├── ...
└── 'xxx.png'
...
├── sceneN
├── 'xxxxx.png'
├── ...
└── 'xxxxx.png'
- Since DeMFI-Net takes 4 input frames, each scene must have at least 4 frames.
- Download the pre-trained weight of DeMFI-Netrb(5,Ntst), which was trained by Adobe240, from this link to place in <source_path>/checkpoint_dir/DeMFInet_exp1.
DeMFI
└── checkpoint_dir
└── DeMFInet_exp1
├── DeMFInet_exp1_latest.pt
- Run main.py with the following options in parse_args (ex) joint Deblurring and Multi-Frame Interpolation (x8)):
python main.py --gpu 0 --phase 'test_custom' --exp_num 1 --N_tst 3 --multiple_MFI 8 --custom_path './custom_path' --patch_boundary 32
- Our proposed DeMFI-Net we can properly regulate '--N_tst' by considering Rt (runtime) or computational constraints, even though the training with Ntrn is once over. Further details are described in the main paper.
- After running with the above test option, you can get the sharp frames in <source_path>/custom_path/sceneN_sharply_interpolated_x'multiple_MFI'.
- You can get any Multi-Frame Interpolation (x M) result by regulating '--multiple_MFI'.
- It only supports for '.png' format.
- Since we can not cover diverse possibilites of naming rule for custom frames, please sort your own frames properly.
- Caution: Please note that since the DeMFI-Net was trained with the predefiend blurry formation setting from BIN (Blurry Video Frame Interpolation) (K = 8 and τ = 5 in Eq. 1), the results can be over-sharpened when the input videos are already sharp (not targeted for low-frame-rate sharp videos). Research on making the network to be robust on the degree of exposure variation can be a future work.
- Download the source codes in a directory of your choice <source_path>.
- First download our Adobe240 (main, split1, split2, split3, split4) (split zip files, 49.7GB) and unzip & place them as belows:
DeMFI
└── Datasets
├──── Adobe_240fps_blur
├──── test
├──── 720p_240fps_1
├──── 00001.png
├──── ...
└──── 00742.png
...
├──── IMG_0183
├──── test_blur
├──── ...
├──── train
├──── ...
├──── train_blur
├──── ...
- Run main.py with the following options in parse_args:
python main.py --phase 'train' --exp_num 1 --train_data_path './Datasets/Adobe_240fps_blur' --test_data_path './Datasets/Adobe_240fps_blur' --N_trn 5 --N_tst 3
- You can freely regulate other arguments in the parser of main.py, here.
- We also provide all visual results (Deblurring and Multi-Frame Interpolation (x8)) on Adobe240 (_a) and GoPro(HD) (_g) for an easier comparison as belows. Each zip file has about 3 to 3.6GB for Adobe240 and 13 to 16GB for GoPro(HD), respectively.
- TNTT_a, TNTT_g, PRF_a, PRF_g, UTI-VFIretrain a, UTI-VFIretrain g, DeMFI-Netrb(5,3) a, DeMFI-Netrb(5,3) g
- Since the copyrights for diverse videos of YouTube240 belong to each creator, we appreciate your understanding that it cannot be distributed.
-
If you want to visualze several components, you can add '--visualization_flag True' visualization_flag option to get a 'visualizations' folder.
-
The diverse components are basically computed by min-max normalization as here, so you can freely modify them to any other visualization technique.
- Our DeMFI-Net also performs arbitrary (x M) multi-frame interpolation and here is 30fps slowmotion demo for M = 5, 13, 19.
If you have any question, please send an email to [Jihyong Oh] - jhoh94@kaist.ac.kr.
The source codes including the checkpoint can be freely used for research and education only. Any commercial use should get formal permission first.
We follow a blurry formation setting from BIN (Blurry Video Frame Interpolation) by averaging 11 consecutive frames at a stride of 8 frames over time to synthesize blurry frames captured by a long exposure, which finally generates blurry frames of 30fps with K = 8 and τ = 5 in Eq. 1. We thank the authors for sharing codes for their awesome works.