Restructure documentation, validate metadata removal, consolidate assets

This commit is contained in:
Victor Kuznetsov
2026-07-25 21:08:04 -07:00
parent 214c9bb3e7
commit 03cd00f132
172 changed files with 2356 additions and 2863 deletions
+10 -11
View File
@@ -2,7 +2,7 @@
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
import cv2
import numpy as np
@@ -10,21 +10,20 @@ import pytest
from PIL import Image
from PIL.PngImagePlugin import PngInfo
CORPUS_NEG_DIR = Path(__file__).resolve().parent.parent / "data" / "synthid_corpus" / "images" / "neg"
if TYPE_CHECKING:
from pathlib import Path
@pytest.fixture
def clean_photo() -> Path:
"""A verified-negative real photo from the corpus neg/ set.
def clean_photo(tmp_path: Path) -> Path:
"""Create a deterministic image with no provenance metadata.
Used by the "non-AI image" assertions (no SynthID, verdict unknown). These
are real photos with no AI provenance, the ground truth for "must not false-
positive". Skips if the corpus is not checked out.
The assertions using this fixture exercise metadata and provenance behavior,
so a generated fixture is sufficient and avoids committing personal photos.
"""
files = sorted(CORPUS_NEG_DIR.glob("*")) if CORPUS_NEG_DIR.exists() else []
if not files:
pytest.skip("no corpus neg/ images present")
return files[0]
path = tmp_path / "clean-control.png"
Image.new("RGB", (128, 96), color=(90, 140, 190)).save(path)
return path
@pytest.fixture