DDColor tiny ONNX 512x512 int8 + model card
Browse files- README.md +48 -0
- ddcolor_tiny_512_int8.onnx +3 -0
README.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: onnx
|
| 4 |
+
pipeline_tag: image-to-image
|
| 5 |
+
base_model: piddnad/ddcolor_paper_tiny
|
| 6 |
+
tags:
|
| 7 |
+
- colorization
|
| 8 |
+
- image-colorization
|
| 9 |
+
- onnx
|
| 10 |
+
- onnxruntime-web
|
| 11 |
+
- int8
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
# DDColor tiny, ONNX 512x512 (int8)
|
| 15 |
+
|
| 16 |
+
An ONNX export of **DDColor paper-tiny** for automatic image colorization, built for in-browser use with
|
| 17 |
+
onnxruntime-web. It powers the Colorize neural filter in the ToolsMonk Photo Editor, where it runs entirely on
|
| 18 |
+
the user's device.
|
| 19 |
+
|
| 20 |
+
## Provenance
|
| 21 |
+
|
| 22 |
+
- Model and code: [piddnad/DDColor](https://github.com/piddnad/DDColor) (Apache-2.0), weights
|
| 23 |
+
`ddcolor_paper_tiny` ([piddnad/ddcolor_paper_tiny](https://huggingface.co/piddnad/ddcolor_paper_tiny)).
|
| 24 |
+
- Architecture settings match the upstream `scripts/export_onnx.py` for `model_size=tiny`: ConvNeXt-T encoder,
|
| 25 |
+
MultiScaleColorDecoder, 100 queries, 3 scales, 9 decoder layers, input 512x512.
|
| 26 |
+
- Exported with `torch.onnx.export`, opset 17, fixed input shape `[1, 3, 512, 512]`.
|
| 27 |
+
- Weights of MatMul and Gemm nodes quantized to uint8 with `onnxruntime.quantization.quantize_dynamic`
|
| 28 |
+
(fp32 export 257.7 MiB, this file 107.5 MiB). Mean absolute difference against the fp32 export on a test
|
| 29 |
+
image: about 1.1 ab units.
|
| 30 |
+
|
| 31 |
+
## File
|
| 32 |
+
|
| 33 |
+
| File | Bytes | SHA-256 |
|
| 34 |
+
|---|---|---|
|
| 35 |
+
| `ddcolor_tiny_512_int8.onnx` | 112,723,138 | `e983347272b8e218edc974a0af2bd66f53b73212abb800e103c64806e4c14a14` |
|
| 36 |
+
|
| 37 |
+
## Input and output
|
| 38 |
+
|
| 39 |
+
- `input`: float32 `[1, 3, 512, 512]`, RGB in 0..1. Feed a grey image: take the CIELAB lightness L of the photo,
|
| 40 |
+
set a = b = 0 and convert back to RGB.
|
| 41 |
+
- `output`: float32 `[1, 2, 512, 512]`, the predicted CIELAB a and b planes.
|
| 42 |
+
|
| 43 |
+
To colorize, resize the predicted a/b planes to the original size and combine them with the original photo's
|
| 44 |
+
L channel, then convert Lab to RGB. Detail and brightness come from the original photo.
|
| 45 |
+
|
| 46 |
+
## Licence
|
| 47 |
+
|
| 48 |
+
Apache License 2.0, the same licence as the upstream DDColor code and weights. See the upstream repository for
|
| 49 |
+
the paper and citation:
|
| 50 |
+
|
| 51 |
+
> Kang et al., "DDColor: Towards Photo-Realistic Image Colorization via Dual Decoders", ICCV 2023.
|
ddcolor_tiny_512_int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e983347272b8e218edc974a0af2bd66f53b73212abb800e103c64806e4c14a14
|
| 3 |
+
size 112723138
|