SuperResolution / README.md
jounery-d's picture
Update README.md
2dcd492 verified
|
raw
history blame
2.52 kB
---
pipeline_tag: image-to-image
---
# SuperResolution
This version of SuperResolution has been converted to run on the Axera NPU using **w8a8** quantization.
This model has been optimized with the following LoRA:
Compatible with Pulsar2 version: 4.2
## Convert tools links:
For those who are interested in model conversion, you can try to export axmodel through
- [The github repo of AXera Platform](https://github.com/AXERA-TECH/SuperResolution.axera)
- [How to Convert ONNX to axmodel](https://github.com/AXERA-TECH/SuperResolution.axera/tree/master/model_convert)
- [Pulsar2 tools](https://huggingface.co/AXERA-TECH/Pulsar2)
## Support Platform
- AX650
- [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
- [M.2 Accelerator card](https://axcl-docs.readthedocs.io/zh-cn/latest/doc_guide_hardware.html)
- AX630C
- [爱芯派2](https://axera-pi-2-docs-cn.readthedocs.io/zh-cn/latest/index.html)
- [Module-LLM](https://docs.m5stack.com/zh_CN/module/Module-LLM)
- [LLM630 Compute Kit](https://docs.m5stack.com/zh_CN/core/LLM630%20Compute%20Kit)
|Chips|model|cost|
|--|--|--|
|AX650|EDSR|800 ms|
| |ESPCN|22 ms|
## How to use
Download all files from this repository to the device
```
root@ax650:~/SuperResolution# tree
.
|-- model_convert
| -- axmodel
| `-- edsr_baseline_x2_1.axmodel
| `-- espcn_x2_T9.axmodel
| -- onnx
| `-- edsr_baseline_x2_1.onnx
| `-- espcn_x2_T9.onnx
| `-- build_config_edsr.json
| `-- build_config_espcn.json
|-- python
| `-- run_onnx.py
| `-- run_axmodel.py
| `-- common.py
| `-- imgproc.py
|-- video
| `-- test_1920x1080.mp4
| `-- 1.png
| `-- 2.png
```
### Inference
Input Data:
```
|-- video
| `-- test_1920x1080.mp4
```
#### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)
```
root@ax650 ~/SuperResolution #python3 run_axmodel.py --model ./espcn_x2_T9.axmodel --scale 2 --dir_demo ./test_1920x1080.mp4
[INFO] Available providers: ['AxEngineExecutionProvider']
[INFO] Using provider: AxEngineExecutionProvider
[INFO] Chip type: ChipType.MC50
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Engine version: 2.12.0s
[INFO] Model type: 2 (triple core)
[INFO] Compiler version: 4.2 6bff2f67
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 267/267 [10:06<00:00, 2.27s/it]
Total time: 99.582 seconds for 267 frames
Average time: 0.373 seconds for each frame
```
Output:
![Example Image](video/2.png)