Use this project on Google Colab for free! Check out the Practical-RIFE Colab Notebook.
2024.01 - We recently release new v4.7-4.14 models. In our tests, 4.14 makes a great improvement for animation scenes. 🎉
![image](https://private-user-images.githubusercontent.com/10103856/287577209-e692b6f0-ff1a-45f7-8cd7-2bd3e6919ec5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyODI1NDMsIm5iZiI6MTcyNDI4MjI0MywicGF0aCI6Ii8xMDEwMzg1Ni8yODc1NzcyMDktZTY5MmI2ZjAtZmYxYS00NWY3LThjZDctMmJkM2U2OTE5ZWM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDIzMTcyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhY2Y2MzkxNzM0YmM3ODE2N2Y3ODU2YTAyNGRiZmI3NGZmZGQ0ODE1ODJhZDA5ZWZkNzllNzhmNmMzMmUzM2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wayyOCkHu7DrVC-FUS7lOhMdqpe-om9dSUTS2umSpK0)
This project is based on RIFE and SAFA. We aim to make them more practical for users by adding various features and designing new models. Because improving the PSNR index is not compatible with subjective effects, we hope this part of work and our academic research are independent of each other. To reduce development pressure, this project is for engineers and developers. For common users, we recommend the following softwares:
SVFI (中文) | RIFE-App | FlowFrames | Drop frame fixer and FPS converter
Thanks to SVFI team to support model testing on Animation.
The content of these links is under the same MIT license as this project. lite means using similar training framework, but lower computational cost model.
4.22 - 41M - 2024.08.08 | Google Drive 百度网盘 || 4.22.lite-21M || 4.21 - 41M - 2024.08.04 | Google Drive 百度网盘
4.20 - 57M - 2024.07.24 | Google Drive 百度网盘 || 4.18 - 20M - 2024.07.03 | Google Drive 百度网盘
4.17 - 2024.05.24 | Google Drive 百度网盘 : Add gram loss from FILM || 4.17.lite
4.15 - 2024.03.11 | Google Drive 百度网盘 || 4.15.lite || 4.14 - 2024.01.08 | Google Drive 百度网盘 || 4.14.lite
v4.9.2 - 2023.11.01 | Google Drive 百度网盘 || v4.3 - 2022.8.17 | Google Drive 百度网盘
v3.8 - 2021.6.17 | Google Drive 百度网盘 || v3.1 - 2021.5.17 | Google Drive 百度网盘
git clone git@github.com:hzwer/Practical-RIFE.git
cd Practical-RIFE
pip3 install -r requirements.txt
Download a model from the model list and put *.py and flownet.pkl on train_log/
You can use our demo video or your video.
python3 inference_video.py --multi=2 --video=video.mp4
(generate video_2X_xxfps.mp4)
python3 inference_video.py --multi=4 --video=video.mp4
(for 4X interpolation)
python3 inference_video.py --multi=2 --video=video.mp4 --scale=0.5
(If your video has high resolution, such as 4K, we recommend set --scale=0.5 (default 1.0))
python3 inference_video.py --multi=4 --img=input/
(to read video from pngs, like input/0.png ... input/612.png, ensure that the png names are numbers)
Parameter descriptions:
--img / --video: The input file address
--output: Output video name 'xxx.mp4'
--model: Directory with trained model files
--UHD: It is equivalent to setting scale=0.5
--montage: Splice the generated video with the original video, like this demo
--fps: Set output FPS manually
--ext: Set output video format, default: mp4
--multi: Interpolation frame rate multiplier
--exp: Set --multi to 2^(--exp)
--skip: It's no longer useful refer to issue 207
The whole repo can be downloaded from v4.0, v4.12, v4.15, v4.18. However, we currently do not have the time to organize them well, they are for reference only.
![image](https://private-user-images.githubusercontent.com/10103856/292820697-5bae134c-0747-4084-bbab-37b1595352f1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyODI1NDMsIm5iZiI6MTcyNDI4MjI0MywicGF0aCI6Ii8xMDEwMzg1Ni8yOTI4MjA2OTctNWJhZTEzNGMtMDc0Ny00MDg0LWJiYWItMzdiMTU5NTM1MmYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDIzMTcyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiODJlMDczN2QyNjFlNmI0MjhmYmE2NGNhOGRjNzQzZGNlMDI0M2VlNGE3ZWRlNDc0NTQ2OWM5YWQzMDNhMDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.60KdkzctV-WJQlNmY8Dr_t2gwHnU9lG-DfGYJJ2IItc)
We are developing a practical model of SAFA. Welcome to check its demo (BiliBili) and provide advice.
v0.5 - 2023.12.26 | Google Drive
python3 inference_video_enhance.py --video=demo.mp4
@inproceedings{huang2022rife,
title={Real-Time Intermediate Flow Estimation for Video Frame Interpolation},
author={Huang, Zhewei and Zhang, Tianyuan and Heng, Wen and Shi, Boxin and Zhou, Shuchang},
booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
year={2022}
}
@inproceedings{huang2024safa,
title={Scale-Adaptive Feature Aggregation for Efficient Space-Time Video Super-Resolution},
author={Huang, Zhewei and Huang, Ailin and Hu, Xiaotao and Hu, Chen and Xu, Jun and Zhou, Shuchang},
booktitle={Winter Conference on Applications of Computer Vision (WACV)},
year={2024}
}
Optical Flow: ARFlow pytorch-liteflownet RAFT pytorch-PWCNet
Video Interpolation: DVF TOflow SepConv DAIN CAIN MEMC-Net SoftSplat BMBC EDSC EQVI RIFE