File size: 1,742 Bytes
8b57be8
531644e
8b57be8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2eb759a
 
8b57be8
 
2eb759a
8b57be8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d77f88d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
pipeline_tag: image-to-image
---

# DeOldify

This version of DeOldify has been converted to run on the Axera NPU using **w8a16** quantization.

This model has been optimized with the following LoRA: 

Compatible with Pulsar2 version: 5.0-patch1

## Convert tools links:

For those who are interested in model conversion, you can try to export axmodel through 

- [The repo of AXera Platform](https://github.com/AXERA-TECH/ax-samples), which you can get the detail of guide

- [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html) 


## 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)
  
|Chips|model|cost|
|--|--|--|
|AX650|colorize_stable|377 ms|

## How to use

Download all files from this repository to the device

```

root@ax650:~/deoldify# tree
.
|-- model
|   `-- colorize_stable.axmodel
|-- python
|`-- run_axmodel.py
|`-- requirements.txt



```

### Inference

Input Data:

```
|-- image
|   `-- 1850Geography.jpg
```

#### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)

```
root@ax650 ~/realesrgan #python3 run_axmodel.py --input_path image/1850Geography.jpg --model_path colorize_stable.axmodel
[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: 5.0-patch1 2295293f
Color image save to `./sr_colorized.jpg`

```

Output:
![Example Image](image/sr_colorize.jpg)