| --- |
| license: mit |
| language: |
| - en |
| pipeline_tag: image-to-image |
| tags: |
| - dehazing |
| - ImageEnhancement |
| --- |
| |
| # ImageDehazing |
|
|
| This is a collection of image dehazing 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) |
| |
|
|
| | 模型 | 输入分辨率 | AX650板端耗时 | |
| |------|-----------|--------------| |
| | AOD-Net | 640×480 | 2.4 ms | |
| | Light-Dehazenet | 480×640 | 9.2 ms | |
| | DehazeFormer_t | 512×512 | 161ms | |
| | MixDehazeNet | 256×256 | 38 ms | |
| | GCANet | 512×512 | 80 ms | |
| | GridDehazeNet | 640×480 | 113 ms | |
| | DEA-Net | 512×512 | 127 ms | |
| | FFA-Net | 512×512 | 873 ms | |
| |
| |
| ## How to use |
| |
| Download all files from this repository to the device |
| |
| ``` |
| 所有模型文件组织方式均如下: |
| . |
| |-- model_convert |
| | |-- axmodel |
| | | `-- dehazeformer-t-512-constant.axmodel |
| | `-- dehazeformer.json |
| |-- pic |
| | `-- 00000_0_0.1800.png |
| |-- python |
| | |-- axmodel_infer.py |
| | `-- onnx_infer.py |
| `-- res |
| `-- output.png |
| |
| ``` |
| |
| ### Inference |
| #### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro) |
| 模型推理,执行命令: |
| ``` |
| (base) root@ax650:~/GCANet# python 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: 7.0 22923e4e |
| Saved: axmodel_output/0051_0.8_0.2_input_dehaze_compare.png |
| Saved: axmodel_output/0099_0.9_0.16_input_dehaze_compare.png |
| |
| |
| ``` |
| |
| 推理结果样例: |
| |
|  |
| |
|  |