File size: 1,645 Bytes
7172a05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636ee16
7172a05
 
 
 
 
 
 
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
---
license: apache-2.0
library_name: coreml
pipeline_tag: image-to-image
tags:
  - coreml
  - colorization
  - image-colorization
  - on-device
  - arxiv:2212.11613
base_model: piddnad/ddcolor_paper_tiny
---

# DDColor Tiny — Core ML (for `img colorize`)

Automatic colorization of black-and-white photographs, on-device. This is the model behind
`img colorize` in [swift-img-cli](https://github.com/arraypress/swift-img-cli), through the
public [swift-image-colorizer](https://github.com/arraypress/swift-image-colorizer) library,
which downloads it on first use.

- **Model:** DDColor (Kang et al., *DDColor: Towards Photo-Realistic Image Colorization via Dual
  Decoders*, ICCV 2023, [arXiv:2212.11613](https://arxiv.org/abs/2212.11613)) —
  [piddnad/DDColor](https://github.com/piddnad/DDColor), Apache-2.0, the `paper_tiny`
  (ConvNeXt-T) checkpoint.
- **Conversion:** coremltools, by
  [mlboydaisuke/DDColor-Tiny-CoreML](https://huggingface.co/mlboydaisuke/DDColor-Tiny-CoreML)
  (Apache-2.0), commit `48c9a506b578460681078e31378e2eaae424a044`. These files are that package
  byte for byte, re-hosted so the tools pin one commit they were measured against.
- **Licence:** Apache-2.0 — see `LICENSE` (DDColor's own).

## Interface

| Field | Value |
|---|---|
| Input `image` | float32 `[1, 3, 512, 512]`, RGB 0…1 — the photo's CIELAB L with a = b = 0, back in sRGB |
| Output `ab_channels` | `[1, 2, 512, 512]`, CIELAB a and b |
| Compute units | `all` |

The library keeps the photograph's own luminance at full resolution and takes only the
predicted a/b, upsampled — so no edge, face or detail moves; only colour is added.