Add AI disclosure layouts, tighten detection and provenance warnings

This commit is contained in:
Victor Kuznetsov committed 2026-10-04 11:03:37 -07:00
1 parent 72752feb33
commit 898f8be789
37 files changed
+1011 -112

No files matched your search

@@ -23,7 +23,6 @@ from the provider's canonical name, the provider is named separately.
| `samsung_en_alpha.png` | Samsung Galaxy AI label, English locale ("AI-generated content", bottom-left) | 5 corpus files | POS 0.11-0.30 vs NEG max 0.40 (binary); tophat/gray tried, no separation. The registered Italian engine scores 0.18-0.31 on the same files -- same layout class, wrong glyph template. |
| `gemini_text_alpha.png` | "Generated with Gemini" text label (bottom-right; the registered gemini mark is the sparkle icon) | 3 corpus files | POS 0.07-0.22 vs NEG max 0.32; coverage gate finds the blob (0.29-0.35) but the Arial silhouette misses Google's letterforms. |
| `notebooklm_alpha.png` | NotebookLM wordmark (bottom-right) | 12 corpus files | locate geometry not yet fitted; POS max 0.12. |
| `dola_alpha.png` | DolaAI on images (the video mark is registered) | 12 corpus files | POS 0.11-0.21 vs NEG max 0.30. |
| `mindvideo_alpha.png` | MindVideo.AI (top-right) | 11 corpus files | POS 0.29-0.32 vs NEG max 0.30 -- borderline overlap, not shippable. |
| `higgsfield_alpha.png` | `HIGGSFIELD AI` wordmark (Higgsfield AI, bottom-right; the boxed `AI` variant shares the cohort) | 5 wordmark files (16 in the boxed-AI OCR cluster) | POS max 0.26 vs NEG max 0.22 -- no separation; the mark may be two-part (wordmark + boxed AI) and needs a composed template. |
| `jianying_alpha.png` | `剪映AI` wordmark (Jianying / 剪映, the China product in the CapCut family; bottom-right) | 2 corpus files | POS 0.29 vs NEG max 0.35. |
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

+68
View File
@@ -0,0 +1,68 @@
"""Rebuild synthetic silhouettes for additional AI disclosure layouts."""
from __future__ import annotations
import logging
import sys
from pathlib import Path
import cv2
import numpy as np
from PIL import Image
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
from scripts.render_vendor_silhouettes import render # noqa: E402
log = logging.getLogger(__name__)
ASSETS = ROOT / "src" / "remove_ai_watermarks" / "assets"
CJK = {"font": "/System/Library/Fonts/Hiragino Sans GB.ttc", "font_index": 2}
def centered_lines(
top: str, bottom: str, *, top_scale: float, bottom_height: float = 1.0, shear: float = 0.0
) -> np.ndarray:
upper, lower = render(top, opts=CJK), render(bottom, opts=CJK)
if bottom_height != 1.0:
lower = cv2.resize(lower, (upper.shape[1], round(upper.shape[0] * bottom_height)))
else:
upper = cv2.resize(upper, (round(lower.shape[1] * top_scale), round(lower.shape[0] * 0.95)))
lines = [upper, lower]
result = np.zeros((sum(line.shape[0] for line in lines) + 2, max(line.shape[1] for line in lines)), np.uint8)
y = 0
for line in lines:
x = (result.shape[1] - line.shape[1]) // 2
result[y : y + line.shape[0], x : x + line.shape[1]] = line
y += line.shape[0] + 2
if shear:
h, w = result.shape
extra = round(abs(shear) * h)
result = cv2.warpAffine(result, np.float32([[1, shear, extra], [0, 1, 0]]), (w + extra, h))
return result
def silhouettes() -> dict[str, np.ndarray]:
return {
"workbuddy_alpha.png": centered_lines("AI生成", "WORKBUDDY>_", top_scale=1.0, bottom_height=0.45),
"yuanbao_compact_alpha.png": centered_lines("元宝", "AI生成", top_scale=0.65, shear=-0.15),
"yuanbao_compact_gray_alpha.png": centered_lines("元宝", "AI生成", top_scale=0.65, shear=-0.15),
"doubao_outline_alpha.png": render("豆包AI生成", opts=CJK),
"samsung_ko_alpha.png": render(
"AI로 생성한 콘텐츠", opts={"font": "/System/Library/Fonts/AppleSDGothicNeo.ttc"}
),
"microsoft_text_alpha.png": render(
"Made with AI", opts={"font": "/System/Library/Fonts/Supplemental/Arial.ttf"}
),
"jimeng_label_alpha.png": render("AI生成", opts={"font": "/System/Library/Fonts/STHeiti Medium.ttc"}),
}
def main() -> None:
logging.basicConfig(level=logging.INFO)
for name, alpha in silhouettes().items():
Image.fromarray(alpha).save(ASSETS / name)
log.info("Rendered %s, %s x %s", name, alpha.shape[1], alpha.shape[0])
if __name__ == "__main__":
main()
+2 -1
View File
@@ -73,7 +73,7 @@ MARKS = {
"gemini_text_alpha.png": "Generated with Gemini",
# Candidate wordmarks measured on a local evaluation corpus (unregistered).
"notebooklm_alpha.png": "NotebookLM",
"dola_alpha.png": "DolaAI",
"dola_alpha.png": "Dola AI",
"mindvideo_alpha.png": "MindVideo.AI",
"higgsfield_alpha.png": "HIGGSFIELD AI",
"capcut_alpha.png": "CapCut AI",
@@ -92,6 +92,7 @@ _REGISTERED = {f"{key}_alpha.png" for key in mark_keys()} & MARKS.keys()
# Per-mark post-processing for the multi-line / slanted stamps (see render()).
MARK_OPTS: dict[str, dict[str, Any]] = {
"dola_alpha.png": {"font": "/System/Library/Fonts/Supplemental/Arial Bold.ttf"},
# Hiragino Sans GB W6, tight leading, dilation, and negative shear match the
# standard Yuanbao stamp without clipping the lower line.
"yuanbao_alpha.png": {