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

SuperResolution

SuperResolution is a model that transforms low-resolution images into high-resolution images through deep learning or other algorithms, aimed at enhancing image details and visual quality.

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

File Description:

m5stack@raspberrypi:~/rsp/SuperResolution $ ls -lh
total 20K
-rw-rw-r-- 1 m5stack m5stack 3.8K Sep  4 18:49 config.json
drwxrwxr-x 4 m5stack m5stack 4.0K Sep  4 18:49 model_convert
drwxrwxr-x 5 m5stack m5stack 4.0K Sep  4 19:12 python
-rw-rw-r-- 1 m5stack m5stack 2.3K Sep  4 18:49 README.md
drwxrwxr-x 2 m5stack m5stack 4.0K Sep  4 19:03 video
  1. Create a virtual environment

    python -m venv sr
  2. Activate the virtual environment

    source sr/bin/activate
  3. 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 opencv-python torch torchvision tqdm scikit-image
  4. Run

    python python/run_axmodel.py --model model_convert/axmodel/edsr_baseline_x2_1.axmodel --dir_demo video/test_1920x1080.mp4

Execution result:

(sr) m5stack@raspberrypi:~/rsp/SuperResolution $ python python/run_axmodel.py --model model_convert/axmodel/edsr_baseline_x2_1.axmodel --dir_demo video/test_1920x1080.mp4 
[INFO] Available providers:  ['AXCLRTExecutionProvider']
[INFO] Using provider: AXCLRTExecutionProvider
[INFO] SOC Name: AX650N
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Compiler version: 4.2 6bff2f67
100%|█████████████████████████████████████████| 267/267 [06:21<00:00,  1.43s/it]
Total time: 275.618 seconds for 267 frames
Average time: 1.032 seconds for each frame

Original video screenshot:

Output video screenshot:

On This Page