File size: 2,195 Bytes
525e655
 
 
 
 
 
 
 
 
 
61df6da
525e655
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61df6da
 
 
 
525e655
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
license: mit
language:
- en
pipeline_tag: image-to-image
tags:
- Low-light-Enhancement
- ImageEnhancement
---

# LowLightImageEnhancement

This is a collection of Low-light Enhancement algorithms, models have been converted to run on the Axera NPU using **w8a8** quantization.

This model has been optimized with the following LoRA: 

Compatible with Pulsar2 version: 6.0 115775d3

## Convert tools links:

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

- [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://docs.m5stack.com/en/ai_hardware/LLM-8850_Card)
  

## 性能基准测试 (Performance Benchmark)

| Model | Input Size | Inference Time |
|-------|-----------|----------------|
| Zero-DCE | 256×256 | 2.6ms |
| Zero-DCE++ | 512×512 | 12.7ms |
| SCI | 600×400 | 1.2ms |
| RetinexFormer | 224×224 | 35ms |


## How to use

Download all files from this repository to the device

```
模型文件组织方式如下:
.
|-- model_convert
|   |-- SCI.json
|   `-- axmodel
|       `-- SCI_TPAMI_600_400.axmodel
|-- pic
|   |-- 00001.png
|   |-- 00051.png
|   |-- 00079.png
|   |-- 00091.png
|   |-- 2062.jpg
|   |-- 2064.jpg
|   |-- 3008.jpg
|   |-- 3018.jpg
|   |-- 3020.jpg
|   `-- NPE_71.png
|-- python
|   |-- axmodel_infer.py
|   `-- onnx_infer.py
`-- res
    `-- axmodel_res.png



```

### Inference

图片推理,执行命令`python3 axmodel_infer.py`:
```
(base) root@ax650:~/SCI# python3 axmodel_infer.py
[INFO] Available providers:  ['AxEngineExecutionProvider', 'AXCLRTExecutionProvider']
[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: 6.0-dirty 115775d3-dirty
Saved comparison → ./axmodel_res.png
Input: (600, 400)  →  model input: (600,400)  →  restored: (600, 400)

```

推理结果样例:
![alt text](SCI/res/axmodel_res.png)