Commit 604cc97
Add visible watermark detection & upgrade invisible watermark confidence (#17)
* Add visible watermark detection and upgrade invisible watermark confidence
Implement two key improvements:
1. Visible watermark detection: New detector analyzes image corners for bright text overlays characteristic of Chinese AI disclosure badges (e.g., "AI生成" on Dreamina images). Uses luminance clustering and text-run analysis to identify watermarks with MEDIUM confidence for known AI positions.
2. Invisible watermark confidence upgrade: Invisible watermark signals now report MEDIUM confidence when indicators are exceptionally strong (bit agreement > 0.90, energy spread > 1.0) or when all 3 indicators fire, instead of always reporting LOW confidence.
Changes:
- New module: src/detector/visible_watermark.rs (bottom-up text detection via corner region analysis)
- Enhanced: src/detector/watermark.rs (confidence escalation logic, video frame confidence passthrough)
- Enhanced: src/detector/mod.rs (integration of visible watermark detection)
- Enhanced: src/known_tools.rs (added "dreamina" pattern)
- Added: i18n strings in all 7 locale files
- Added: 3 integration tests for visible watermark detection
- Added: test fixture (Dreamina image with visible watermarks)
Results:
- Dreamina image: LOW → MEDIUM (now detects both invisible + visible watermarks)
- Sora video: LOW → MEDIUM (exceptionally strong invisible watermark signals)
- No false positives on clean images
All 67 tests passing.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* Fix CI: resolve rustfmt and clippy lint errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 4c1857e commit 604cc97
File tree
13 files changed
+719
-3
lines changed- locales
- src
- detector
- tests
- fixtures
13 files changed
+719
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
354 | 364 | | |
355 | 365 | | |
356 | 366 | | |
| |||
0 commit comments