CoolFace
Datasetpublic

w46881/coloringzap-lineart-parameters

Photo-to-line-art parameter sweep (coloringzap) Review date: 2026-09-15 — every number here was measured by scripts/export-dataset.mjs, not estimated. Which settings turn a photo into a clean, printable line drawing? This dataset is the measured answer: 128 rows covering 32 parameter combinations across 4 synthetic image classes, plus the 8 test images that went in and came out. These measurements were produced by the same open-source pipeline that runs in the browser at… See the full description on the dataset page: https://huggingface.co/datasets/w46881/coloringzap-lineart-parameters.

sourceHugging Facecc0-1.0updated 11d agoView on Hugging Face
0likes57downloads
Dataset Card

Photo-to-line-art parameter sweep (coloringzap)

Review date: 2026-09-15 — every number here was measured by scripts/export-dataset.mjs, not estimated.

Which settings turn a photo into a clean, printable line drawing? This dataset is the measured answer: 128 rows covering 32 parameter combinations across 4 synthetic image classes, plus the 8 test images that went in and came out.

These measurements were produced by the same open-source pipeline that runs in the browser at https://coloringzap.com, published in full at https://github.com/w46881/coloringzap-algorithms.

Headline result

Best parameter set per image class:

image classblur radiussobel thresholddilateline coverage %lone-speck %
flat-vector (bold shapes, hard edges)02012.520.00
smooth-portrait (soft gradients)02000.000.00
detailed-texture (fine repeat)390023.550.00
noisy-lowlight (grainy)19004.020.00

Files

filerows / countwhat it is
data/parameter-sweep-full.csv128 rows + headerevery combination tested, with its score
data/parameter-best-per-class.csv4 rows + headerthe winning setting per image class
data/REVIEW-DATE.txt1the date these numbers were measured
data/samples/sample-0X-input.png4 filesthe synthetic test image, 400x300 grayscale
data/samples/sample-0X-lineart.png4 fileswhat the winning parameters produce
scripts/export-dataset.mjs—regenerates all of the above (MIT)
src/edge-detection.js—the pipeline being measured (MIT)
LICENSE-DATA.txt—CC0 1.0 Universal, covers data/
LICENSE-CODE.txt—MIT, covers scripts/ and src/

Columns in parameter-sweep-full.csv

columnmeaning
image_classshort slug: flat-vector / smooth-portrait / detailed-texture / noisy-lowlight
image_class_descriptionwhat that class looks like
blur_radiusGaussian blur radius applied before edge detection (0–3)
sobel_thresholdgradient magnitude needed to call a pixel a line (20/40/60/90)
dilate_iterationshow many times the edges were thickened (0 or 1)
line_coverage_pctshare of the image that became black line
lone_speck_pctshare of line pixels with no neighbouring line pixel (isolated dots)
score2 x lone_speck_pct plus a penalty for coverage outside 1.5–12%; lower is better
is_best_for_classyes on the winning row for that class

How "clean" was measured

  • —line coverage % — below ~1.5% the page is nearly blank; above ~12% it turns into a muddy grey blob.
  • —lone-speck % — isolated dots are what make a page look dirty.
  • —Winner = lowest 2 x lone-speck% + penalty(coverage outside 1.5–12%).

Known limits

  1. 1.Smooth gradients produce nothing. The smooth-portrait class returned 0.00% line coverage at all 32 combinations — soft shading has no local step for the Sobel operator to catch. No setting fixes this; it needs a different algorithm.
  2. 2.Busy photos stay muddy. detailed-texture only reached a printable state at blur 3 / threshold 90, and even then coverage was 23.55%, well above the ~12% ceiling.
  3. 3.The test images are synthetic, generated procedurally by the script — not real photographs, and not photos of any person. Treat the numbers as a starting point and re-run the script on your own images.
  4. 4.`lone-speck %` is 0.00 in every row. Do not read that as "the denoise step is perfect"; read it as "speckle was not the failure mode on these four images".

Reproduce

bash
node scripts/export-dataset.mjs

No dependencies, no network. Node 18 or newer.

License — two scopes, deliberately not mixed

  • —Data (data/*.csv, data/**/*.png) — CC0 1.0 Universal (public domain). Copy it, republish it, build on it, no attribution required.
  • —Code (scripts/, src/) — MIT.

Citation

coloringzap.com (2026). Photo-to-line-art parameter sweep (coloringzap).
Measured 2026-09-15. CC0 1.0 (data) / MIT (code).
https://coloringzap.com  |  https://github.com/w46881/coloringzap-algorithms