AGENT SKILL

image-forensics

Use when checking whether an image is a real camera capture or synthetic/generated, when tagging media provenance before ingestion, when verifying visual evidence for fact-check, or when validating that ai3d-gen source photos are real captures before splatting. Covers PRNU noise-residual forensics, EXIF/XMP/C2PA first pass, and PCE scoring via extensions/image-forensics.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
1

01 前言 Front Matter

name
image-forensics
description
Use when checking whether an image is a real camera capture or synthetic/generated, when tagging media provenance before ingestion, when verifying visual evidence for fact-check, or when validating that ai3d-gen source photos are real captures before splatting. Covers PRNU noise-residual forensics, EXIF/XMP/C2PA first pass, and PCE scoring via extensions/image-forensics.

03 SKILL.md 正文

Image Forensics

Cheap image provenance: real-vs-synthetic plus "which camera took this". Route: extensions/image-forensics/verdict.py — JSON contract {ok, verdict, pce, metadata_flags, notes}.

Evidence ordering (always in this order)

  1. Metadata first pass — metadata.py: EXIF/XMP/C2PA report. Generator tags (stable diffusion, dall-e, ...) or a C2PA manifest are fast signals. Absence of EXIF is NOT evidence of synthesis: metadata dies on screenshot/re-upload; pixel noise does not.
  2. Noise residual — prnu.residual: denoise (wavelet via PyWavelets when installed, Gaussian fallback) and subtract; the remainder is the fingerprint candidate.
  3. Reference pattern — verdict.py --build-ref dir/ --out ref.npy averages residuals of N flat-ish real photos from one device.
  4. PCE score — prnu.pce: peak-to-correlation-energy of residual vs reference. Goljan's empirical band ~50-60 discriminates; calibrate on the local dataset, never treat thresholds as universal.
  5. Verdict: real_capture / synthetic / inconclusive / no_reference + flags + notes.

Abstain rules

  • Residual energy below the denoiser floor (flat or heavily recompressed input) -> inconclusive, note low_residual_energy.
  • Heavy crop/resize/recompression weakens the signal; say so in notes.
  • Never claim provenance from a single signal: combine metadata flags + residual + PCE. For publication, pair with fact-check.
  • No camera reference available -> no_reference; build one or abstain.
  • JPEG-domain caveat (measured 2026-11-09, see .devin/research/2026-11-09-if-heldout-eval.md): a ref built from camera JPEGs cannot reliably distinguish OTHER JPEGs - the shared quantization signature dominates the residual and synthetic JPEGs score real_capture at default thresholds. Prefer lossless camera originals (PNG/TIFF) for refs; when only JPEGs exist, raise --pce-real per-domain and validate with eval_set.py first.

Commands

python extensions/image-forensics/verdict.py shot.jpg --ref ref.npy
python extensions/image-forensics/verdict.py --build-ref known_phone/ --out ref.npy
python extensions/image-forensics/metadata.py shot.jpg

Integrations

  • ai3d-gen preflight: source images should verify as real captures before the splat pipeline (synthetic inputs break PRNU assumptions).
  • fact-check: visual-evidence tagging.
  • PPISP (extensions/ppisp-prep) models complementary per-camera photometrics (exposure/vignette/CRF) — provenance vs correction answer different questions; do not conflate.

04 同仓库更多 Skills

Leostruka
Leostruka/devin-bundle

montador-de-ideias

Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.

★ 0
Leostruka
Leostruka/devin-bundle

git-github-adaptive-engineering

Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.

★ 0
Leostruka
Leostruka/devin-bundle

adaptive-agenda-calendar-routine-engine

Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0