One real phone photo of a Japanese math worksheet (sample002, 3133×2229).
Same input, same scorer. Goal: remove pencil + red-pen, keep the printed problems.
score.py, ink-restricted vs GT masks)| eraser | print recall safety — keep print |
handwriting-erase utility — remove pencil |
cost / page |
|---|---|---|---|
| CNN v4 (U-Net, local) | 0.986 | 0.83 | ~free |
| Nano Banana (premium, tiled Pro) | 0.988 | 0.39 | ¥200 |
Safety: tie (~0.98 both — neither meaningfully harms print). Utility: CNN wins on the metric — but read the nuance below before concluding.
Flipping CNN↔NB in the same spot makes the difference obvious: CNN = clean white but a few bold dark leftovers; NB = uniform faint haze, nothing bold.

Left input → middle CNN (erased to paper, leaves a bold "96" + a division) → right NB (everything faintly lightened, no bold marks).

Both keep the printed geometry figures intact — the safety metric tie, visually.
| config | print recall | HW-erase | cost/page | verdict |
|---|---|---|---|---|
| Pro, tile 1536 (6 tiles) | 0.988 | 0.39 | ¥200 | approved baseline |
| ★ NB2, tile 2048 (4 tiles) | 0.995 | 0.39 | ¥100 | ★ ship — = quality, ½ price, safer print |
| Pro, tile 2048 (4 tiles) | 0.833 | 0.39 | ¥200 | rejected — erases print |
Composite mode keeps the original print, so the model only needs to find handwriting + fill paper — Pro's costly faithful-print-recreation is wasted. NB2 does the needed job at half price. (Flip NB Pro ¥200 ↔ ★ Ship NB2 ¥100 above — visually identical.)

Dense-pencil zoom: input · Pro ¥200 · NB2 ¥100 — same faint-haze erase, print intact.
The per-tile NB-cleaned output is fully clean — NB erases the pencil completely. The faint smudge appears only after our composite, which keeps the original pixels wherever the conservative diff-mask doesn't fire (faint pencil → too small a difference → mask skips it). So the smudge is the price of the safe mask (print recall 0.995). Flip ★ Ship NB2 ¥100 ↔ Fill (trust NB) above to see it vanish.

Left input · middle SHIP composite (smudge from kept-original) · right FILL (fully trust NB → smudge gone). Trade-off: Fill reframes the page and AI-recreates every printed character (print recall 0.962 vs 0.995, and not pixel-preserved) — cleaner, but loses the guarantee that printed problems are untouched. The ship config keeps that guarantee; the smudge is the cost. A future tuned mask can split the difference.