RIFE 插帧模型环境搭建

1. 克隆代码
git clone https://github.com/hzwer/ECCV2022-RIFE.git
2. 创建环境
conda create -n rife python=3.12
conda activate rife
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
pip install -r requirements.txt

安装requirements.txt会报错:ERROR: Failed to build 'numpy' when getting requirements to build wheel
这是numpy的问题,实测发现numpy并不限制于requirements.txt所要求的>=1.16, <=1.23.5
删除requirements.txt文件中对numpy版本的要求,requirements.txt文件修改后如下:

numpy
tqdm>=4.35.0
sk-video>=1.1.10
torch>=1.6.0
opencv-python>=4.1.2
moviepy>=1.0.3
torchvision>=0.7.0

然后执行命令:

pip install -r requirements.txt

我安装的numpy的版本如下:

numpy==2.4.1

如果遇到报错:ImportError: libQt5Core-195a14c9.so.5.15.18: cannot open shared object file: No such file or directory
解决方案如下:

pip uninstall opencv-python -y
pip install opencv-python-headless

注意:记得下载模型所需要的权重文件,详见原论文GitHub链接中的百度网盘链接:
原论文GitHub链接:https://github.com/hzwer/ECCV2022-RIFE

posted @ 2026-02-08 22:48  wangfeng1995  阅读(158)  评论(0)    收藏  举报