DDColor tiny (LiteRT / TFLite, fp16 weights)

DDColor "paper tiny" (ConvNeXt-T encoder, multi-scale colour decoder) converted to a single .tflite file for on-device colourisation of black-and-white photos with LiteRT.

File Size SHA-256
ddcolor_tiny_fp16.tflite 133,183,696 bytes bfcf636f337891ad9a877d79d17b71ffcb69ca2223a9e2ce6b08c63511d7c838

Weights are stored as fp16; computation is fp32. Against the fp32 conversion the predicted Lab a/b differ by at most 0.17 (mean 0.007), which is invisible.

Input and output

  • Input: [1, 3, 512, 512], NCHW, float32, values 0 to 1. This is the photo's brightness shown as a neutral grey picture: convert the photo to Lab, keep L, set a = b = 0, convert back to sRGB, resize to 512 x 512.
  • Output: [1, 2, 512, 512], the Lab a and b channels. Resize them to the photo's size and combine them with the photo's own full-resolution L channel, so no detail is lost.

Provenance

  1. Upstream weights: piddnad/ddcolor_paper_tiny (Apache-2.0).
  2. ONNX build: ipsilondev/ddcolor-onnx (Apache-2.0), fp16, SHA-256 324c626acebe624c3f10fcdf1ca85f3c1ba9e896f1457b2ad5072237e34b5c87.
  3. Rewritten as fp32 ONNX, converted with onnx2torch and litert-torch (output matches onnxruntime to 3e-6), then the weights were stored as fp16 with ai-edge-quantizer.

Colours are a plausible guess, not the true colours of the scene.

Speed

About 7 to 10 seconds per photo on a Pixel 10 Pro (CPU or GPU), measured with a synthetic input.

Licence and credit

Apache-2.0, as upstream. Credit to the DDColor authors (Xiaoyang Kang et al., Alibaba DAMO Academy) and to ipsilondev for the ONNX conversion.

Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for AtlasPilotPuppy1/ddcolor-tiny-litert

Finetuned
(1)
this model