← All posts

ClearPix engineering series · Part 21

Automatic Watermark Detection: What 500 Real Cases Changed

By the ClearPix team · Nov 7, 2026 · 7 min read

We tested automatic watermark detection on 500 real AI-platform frames: editable-selection coverage rose from 75.8% to 95.0%. A separate 36-image human-mask evaluation still measured only 47.1% precision and 11.0% recall. Those results are not contradictory: locating a useful corner box is much easier than selecting exactly the watermark pixels.

Check Before After What it actually measures
Real platform frames with a selection 379 / 500 (75.8%) 475 / 500 (95.0%) Whether Auto Detect leaves something editable
Frames with no selection 121 25 Coverage failures
Runtime errors 0 0 Batch stability
Human-labeled mask precision — 47.1% Selected pixels that match human masks
Human-labeled mask recall — 11.0% Human-mask pixels recovered by Auto Detect
Human-labeled IoU — 9.8% Pixel intersection over union

The last three rows are the warning label. This work made Auto Detect more useful; it did not make automatic masks exact.

Start with the job, not the model leaderboard

A person using a watermark remover wants the mark gone. They do not want to learn the difference between object detection, segmentation and inpainting before they can click Remove.

Our original pipeline already had three useful parts. A detector proposed boxes. Text heuristics produced glyph-shaped masks. LaMa or MI-GAN rebuilt the selected area. We added SlimSAM because a promptable segmenter can turn a rough click or box into an object-shaped selection. In manual use, that worked well: a person could click a mark, reject a bad candidate and add another prompt.

Auto Detect exposed a different problem. A detector box is not a segmentation prompt with known intent. It may contain a watermark, part of the scene, or both. Feeding every box to SAM simply gave us a more expensive way to select the wrong object.

The first rule became conservative: automatic selection should act only when several independent signals agree. If they do not, leave the target for a manual click, box or brush.

The first pipeline was too willing to paint

The initial combined route tried SAM candidates and glyph masks, then fell back to boxes. On a 26-image development set, an early full run reached 31.3% recall but only 6.5% precision. Large false-positive areas dominated the result. Eleven cases also failed in that early evaluator, so even its aggregate numbers were not a clean product baseline.

Filtering alone did not fix it. A more conservative run raised precision to 13.7%, with 34.1% recall. That trade was still unusable: too much scenery was being selected.

We then required the automatic mask to pass several geometric checks. SAM pixels had to intersect the detector box, remain mostly contained by it, overlap available glyph evidence, and stay below both box-relative and whole-image area limits. Text masks used the intersection of glyph and local-stroke evidence rather than their union. The 26-image run reached 57.7% precision and 19.9% recall, with 12 of 26 cases receiving an automatic mask.

That looked like progress until we evaluated a different set. On the 36 human-annotated images, Auto Detect measured 47.1% precision, 11.0% recall and 9.8% IoU. Only one case met the evaluator’s complete-case criterion. A threshold tuned on a small development set had not become a general solution.

This is why the original YOLO, OCR and glyph-mask design still matters, but cannot be the end of the pipeline. It supplies evidence about where text might be. It does not prove which pixels belong to an overlay.

Use SAM where its answer can be checked

SAM now runs automatically only for candidates with supporting structure: similar detected boxes or solid watermark-like regions. A lone weak text proposal does not automatically trigger segmentation.

For each accepted candidate, we check:

  • at least 5% of the detector box is covered;
  • at least 60% of the candidate stays inside that box;
  • text candidates have at least 35% overlap with glyph evidence;
  • the candidate is no larger than twice the box area;
  • the candidate covers no more than 20% of the whole image.

These are guards, not a measure of semantic correctness. They reject obvious spills and disconnected scene selections. They cannot prove that a white letter is a watermark rather than a road marking or clothing print.

The conservative text path is stricter still. It requires detection quality of at least 0.95, enough glyph pixels, sensible fill and containment, limited background complexity, and a text-like aspect ratio. When those conditions fail, it returns no bitmap rather than silently substituting a large rectangle.

That behavior follows the lesson from our earlier false-positive cleanup: a missed automatic selection can be repaired by the user, while an automatic mask over the main subject can ruin the image.

“Find Similar” needed evidence too

Repeated marks looked like an easy win. Select one watermark, match its gray-level and edge pattern in other detector boxes, then translate the accepted mask to matching positions.

The first attempts were not good enough. On a difficult five-case repeated-mark set, the evaluated variants selected large incorrect areas; precision stayed around 1–2%. Template similarity can be fooled by repeated texture, and a translated mask inherits the shape and alignment errors of the source.

We kept the capability but narrowed its job. Similar-box detection compares source type, watermark type, dimensions and masked edge appearance. The interface offers Find Similar only when at least three similarly sized candidates support the pattern. It is an optional way to reduce repeated clicking, not proof that every matching patch should be removed.

A second segmentation model did not rescue the metrics

We also tested a dedicated watermark-segmentation model on the human-labeled set. At a 0.3 threshold it reached 65.0% precision and 31.4% recall—better than the automatic hybrid on those metrics, but still short of the “selected means correct” behavior we wanted.

A two-model intersection did not reproduce the strong synthetic-set result that motivated the experiment. On the human set, its best listed operating points were around 65–66% precision with lower recall as thresholds rose. A lightweight student-model distillation route produced no usable Golden Set output and was not integrated.

Those experiments were worth doing because they closed off an attractive shortcut. Adding another model or taking an intersection is not automatically a precision strategy. The evaluation set decides whether the idea survives.

The 500-frame batch changed a different bottleneck

The human set is good for pixel truth. It is too small to describe the variety of platform marks people actually bring to the tool. We therefore built a separate batch runner for 500 frames from AI video platforms, with per-brand, position and style summaries, mask RLE output, resume support and screenshot capture.

This runner measures selection coverage, not pixel precision. It also checks that the red pixels used for measurement are new overlay pixels rather than red content already present in the source.

The largest remaining coverage problem was not SAM making bad masks. It was the pipeline returning nothing when no exact mask passed. For a single detector box, we already kept an editable box fallback. We extended that idea to multiple candidates, but only for a high-confidence, small edge region:

  • detection quality at least 0.95;
  • box center within 0.15 normalized units of an image edge;
  • box area no larger than 8% of the image;
  • candidates ranked by detection quality plus an edge-position bonus.

The result is deliberately a box, not a claim of exact segmentation. A person can move it, resize it or switch to Smart, Paint or Rect before removal.

Platform group Frames Selected after the change No selection
Alice AI 133 123 (92.5%) 10
Dola AI 69 69 (100%) 0
Luma AI 46 42 (91.3%) 4
All platform and generic marks 500 475 (95.0%) 25

Offline candidate-ranking checks agreed with the expected watermark region for 437 of 451 selected candidates, or 96.9%. That number describes location metadata. It is not a substitute for the human-mask precision result above.

The remaining 25 no-selection frames mainly contained low-confidence proposals, oversized boxes, unusual positions or complete detection misses. We left them unselected rather than lowering every threshold to make the coverage chart reach 100%.

What this means for the product

Auto Detect is now a first pass with visible limits. It can produce a precise mask when the evidence agrees, or an editable box when a small high-confidence edge target needs review. It can also return nothing. Smart selection, a rectangle and a brush remain part of the same workflow rather than hidden fallbacks.

For video workflows built around stable platform overlays, we also published focused preset pages for Alice AI watermark removal, Dola AI watermark removal and Luma Dream Machine watermark removal. Their sample data shows why presets need review: all sampled Alice and Dola marks were bottom-right, while only 80.4% of Luma marks were upper-left.

The same sample now supports preset guides for DeeVid AI, Dreamina AI / Jimeng, POLLO AI, Kling AI, Hailuo AI / MiniMax, Vidu AI and DIGEN AI. Each page addresses its actual layout: Dreamina has two independently editable marks, POLLO includes the solid backing plate, and Hailuo accounts for a longer bottom-edge wordmark.

The next improvement is not a blanket lower threshold. We need more human masks across low-contrast text, solid badges and repeated marks, then per-type operating points with false-positive cost attached. Coverage tells us how often the tool offers a starting point. Human-labeled precision tells us whether that starting point can be trusted.

Try the current workflow in the image watermark remover, or use the video watermark remover for fixed overlays. Both run locally in the browser; review the mask before removing, and add missed areas manually.

Part 21 of the ClearPix engineering series. Evaluation code: apps/web/scripts/eval-auto-select-quality.mjs and apps/web/scripts/eval-watermark-batch.mjs. The 500-frame snapshot is a fixed internal QA sample; its coverage figures are not presented as public benchmark accuracy.

ClearPix is free, unlimited and runs entirely in your browser. If this post saved you a debugging session, a coffee keeps the model hosting and bandwidth paid for — nothing here is locked behind it.

Buy me a coffee