mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-08-27 16:02:28 +02:00
feat(metadata): read EXIF Make tag; collect Ideogram/Recraft/Krea-FLUX
Collected live samples from three popular generators we lacked: - Ideogram tags its downloads with EXIF Make="Ideogram AI" (no C2PA, no SynthID, no imwatermark) -- the Make tag is its only signal. exif_generator only read Software/Artist/ImageDescription, so it missed this; now reads Make too. Real cameras put "Apple"/"Canon" in Make (no AI token), so this stays low-false-positive. 4 originals ingested. - Recraft (PNG export) and Krea hosting FLUX 2: downloads carry NO detectable signal -- no C2PA/EXIF/IPTC, and notably no imwatermark despite Krea running FLUX. identify correctly reports 'unknown'. Both ingested as neg fixtures. Lesson recorded in CLAUDE.md: the imwatermark detector fires only on pristine output from a pipeline that runs the encoder (diffusers default, official BFL), not from re-hosts (Krea/Stability) or re-encoded exports (Recraft/Canva). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
ad3b8ee248
commit
ede35a3db5
@@ -362,6 +362,21 @@ class TestExifGenerator:
|
||||
path = _img_with_software(tmp_path, "jpg", "Adobe Photoshop 25.0")
|
||||
assert exif_generator(path) is None
|
||||
|
||||
def test_make_tag_ai_tool_detected(self, tmp_path: Path):
|
||||
# Ideogram tags its output with EXIF Make="Ideogram AI" (verified on a
|
||||
# real download), so the Make tag must be read too.
|
||||
exif = piexif.dump({"0th": {piexif.ImageIFD.Make: b"Ideogram AI"}, "Exif": {}, "GPS": {}, "1st": {}})
|
||||
path = tmp_path / "ideogram.jpg"
|
||||
Image.new("RGB", (64, 64)).save(path, exif=exif)
|
||||
assert exif_generator(path) == "Ideogram AI"
|
||||
|
||||
def test_camera_make_not_flagged(self, tmp_path: Path):
|
||||
# A real camera Make ("Apple") carries no AI token -> not flagged.
|
||||
exif = piexif.dump({"0th": {piexif.ImageIFD.Make: b"Apple"}, "Exif": {}, "GPS": {}, "1st": {}})
|
||||
path = tmp_path / "iphone.jpg"
|
||||
Image.new("RGB", (64, 64)).save(path, exif=exif)
|
||||
assert exif_generator(path) is None
|
||||
|
||||
def test_xmp_creatortool_scan_covers_unopenable(self, tmp_path: Path):
|
||||
# PIL can't open this fake HEIF; the raw XMP CreatorTool scan still works.
|
||||
path = tmp_path / "fake.heic"
|
||||
|
||||
Reference in New Issue
Block a user