Vision Models
Collection
Common computer vision class models, such as the YOLO family
•
21 items
•
Updated
•
2
This version of RMBG-1.4 has been converted to run on the Axera NPU using w8a8 quantization.
Compatible with Pulsar2 version: 5.1
For those who are interested in model conversion, you can try to export axmodel through
| Chips | cost |
|---|---|
| AX650 | 128 ms |
Download all files from this repository to the device
(base) root@ax650:/home/ax650/RMBG-1.4# tree
.
├── ax_inference.py
├── axmodel
│ ├── build_config.json
│ └── rmbg1_4_ax650.axmodel
├── ax_rmbg
├── img
│ ├── 3_1920x1080.jpg
│ └── example_input.jpg
├── mask.png
├── README.md
├── result.png
└── rmbg_1_4_sim.onnx
If you Inference with python,pyaxengine is need,you can install by:
wget https://github.com/AXERA-TECH/pyaxengine/releases/download/0.1.3.rc1/axengine-0.1.3-py3-none-any.whl
pip install axengine-0.1.3-py3-none-any.whl
Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)
(base) root@ax650:/home/ax650/RMBG-1.4# python3 ax_inference.py -m ./axmodel/rmbg1_4_ax650.axmodel -i ./img/example_input.jpg
Command: ax_inference.py -m ./axmodel/rmbg1_4_ax650.axmodel -i ./img/example_input.jpg
Parameters:
--model: ./axmodel/rmbg1_4_ax650.axmodel
--img_path: ./img/example_input.jpg
--save_path: ./result.png
[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: 0 (single core)
[INFO] Compiler version: 5.1 59c683ff
输入名称:input,输入尺寸:[1024, 1024]
推理时间:121.97 ms
推理完成,带透明通道的结果已保存至:./result.png
| Input | Output |
|---|---|
![]() |
![]() |
Inference with C++ version :
(base) root@ax650:/home/ax650/RMBG-1.4# ./ax_rmbg -m ./axmodel/rmbg1_4_ax650.axmodel -i ./img/3_1920x1080.jpg
--------------------------------------
Model file: ./axmodel/rmbg1_4_ax650.axmodel
Input image: ./img/3_1920x1080.jpg
Output image: result.png
Model input size: 1024 x 1024
Repeat count: 1
--------------------------------------
Original image size: 1920 x 1080, channels: 3
Engine creating handle is done.
Engine creating context is done.
Engine get io info is done.
Inputs:
[0] name: input, shape: [1, 3, 1024, 1024]
Outputs:
[0] name: output, shape: [1, 1, 1024, 1024]
Engine alloc io is done.
Engine push input is done.
--------------------------------------
post process cost time:23.89 ms
--------------------------------------
Repeat 1 times, avg time 106.16 ms, max_time 106.16 ms, min_time 106.16 ms
--------------------------------------
Saved result image: result.png
Saved mask: mask.png
| Input | Output | Mask |
|---|---|---|
![]() |
![]() |
![]() |
Base model
briaai/RMBG-1.4