pdf-icon

Product Guide

Offline Voice Recognition

Industrial Control

IoT Measuring Instruments

Air Quality

Module13.2 PPS

Ethernet Camera

DIP Switch Usage Guide

Module GPS v2.0

Module GNSS

Module ExtPort For Core2

Module LoRa868 V1.2

RIFE

RIFE is a real-time video frame interpolation model based on deep learning, capable of efficiently predicting intermediate frames to increase video frame rates. It is widely used in video smoothness enhancement and animation production.

  1. Manually download the model and upload it to raspberrypi5, or pull the model repository using the following command.
Tip
If git lfs is not installed, please refer to git lfs installation guide for installation.
git clone https://huggingface.co/AXERA-TECH/RIFE.axera

File Description:

m5stack@raspberrypi:~/rsp/RIFE.axera $ ls -lh
total 52K
-rw-rw-r-- 1 m5stack m5stack 1.1K Sep 29 14:28 build_config.json
-rw-rw-r-- 1 m5stack m5stack    0 Sep 29 14:28 config.json
drwxrwxr-x 2 m5stack m5stack 4.0K Sep 29 14:28 model
-rw-rw-r-- 1 m5stack m5stack 6.9K Sep 29 14:28 ms_ssim.py
-rw-rw-r-- 1 m5stack m5stack 1.8K Sep 29 14:28 README.md
-rw-rw-r-- 1 m5stack m5stack   88 Sep 29 14:28 requirements.txt
-rw-rw-r-- 1 m5stack m5stack 9.2K Sep 29 14:28 run_axmodel.py
-rw-rw-r-- 1 m5stack m5stack 9.2K Sep 29 14:28 run_onnx.py
drwxrwxr-x 2 m5stack m5stack 4.0K Sep 29 14:28 video
  1. Create a virtual environment
python -m venv rife
  1. Activate the virtual environment
source rife/bin/activate
  1. Install dependencies
pip install https://github.com/AXERA-TECH/pyaxengine/releases/download/0.1.3.rc1/axengine-0.1.3-py3-none-any.whl
pip install -r requirements.txt
  1. Run
python3 run_axmodel.py --model ./model/rife_x2_720p.axmodel --video ./video/demo.mp4

Run result:

(rife) m5stack@raspberrypi:~/rsp/RIFE.axera $ python3 run_axmodel.py --model ./model/rife_x2_720p.axmodel --video ./video/demo.mp4
[INFO] Available providers:  ['AXCLRTExecutionProvider']
[INFO] Using provider: AXCLRTExecutionProvider
[INFO] SOC Name: AX650N
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Compiler version: 4.2 77cdc0c2
./video/demo.mp4, 128.0 frames in total, 25.0FPS to 50.0FPS
The audio will be merged after interpolation process
 99%|██████████████████████████████████████▋| 127/128.0 [02:45<00:01,  1.30s/it]
On This Page