Separate provenance extraction and detection, release 0.21.0

This commit is contained in:
Victor Kuznetsov
2026-07-29 13:13:39 -07:00
parent 28d23a3023
commit 408c4c9d5d
8 changed files with 189 additions and 40 deletions
+20 -2
View File
@@ -88,8 +88,8 @@ print(report.platform)
print(report.signals)
```
Use `check_visible=False` and `check_invisible=False` for metadata only
inspection:
Use `check_visible=False` and `check_invisible=False` for metadata-only
inspection through the compatible path-based API:
```python
report = identify(
@@ -99,6 +99,24 @@ report = identify(
)
```
Extraction and detection are also available as separate steps. This is useful
when a file-reading worker collects the metadata once and another component
evaluates the resulting evidence:
```python
from remove_ai_watermarks.identify import (
extract_provenance_evidence,
identify_from_evidence,
)
evidence = extract_provenance_evidence(Path("input.png"))
report = identify_from_evidence(evidence)
```
`identify_from_evidence` does not reopen the source file. It evaluates metadata
only; registered visible marks and pixel-backed invisible watermarks remain in
the path-based `identify` call.
## Strip metadata
```python