mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-08-09 15:36:01 +02:00
Cover the fidelity probe, and run it where ffmpeg actually exists
The probe shipped with no tests while every sibling research script has them, and it needs neither a model nor a GPU, so nothing justified the gap. Its whole output is a ranking and a mispaired comparison still prints a plausible number, so the pairing tests carry more weight than the metric ones. The centerpiece builds a correctly phased and a wrong-phased delivery of the same clip. Both have six frames, so the frame-count check the probe used to rely on passes for both; the misaligned one scores near 9 dB against 40+. A separate assertion pins that the probe binds the engine's sampler rather than a copy, which is the contract a same-phase private copy would otherwise satisfy silently. This file now holds the only constraint on that sampler's phase. CI ran none of this. The test matrix installs no ffmpeg, and the job that does install it ran one class from another file, so five of these tests would have skipped on every runner. The video-e2e job now collects this file too. Recorded in .claude/rules/development.md: mutating the sampler's >= to > proves nothing, because the 1e-9 epsilon makes both branches agree on exact equality. The phase or the period is what has to move. That inert mutation passed a green suite here before the real one failed five tests. Dropped the downscale test's PSNR bound: solid colors survive both the downscale and the upscale exactly, so any score there pins the local ffmpeg's chroma rounding rather than the probe. Geometry is the assertion that means something. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
acd7092477
commit
613b349358
@@ -348,6 +348,13 @@ Regression coverage:
|
||||
properties, metadata stripping, and a large-`mdat` metadata case that rejects
|
||||
any full-source `read_bytes()` call. CI installs ffmpeg explicitly for this
|
||||
test so the integration gate cannot silently skip.
|
||||
- [`test_video_fidelity_probe.py`](../tests/test_video_fidelity_probe.py), which
|
||||
builds its clips from solid-color frames whose index is recoverable from the
|
||||
pixels, so a decimation that keeps the frame count but shifts the phase scores
|
||||
far worse instead of passing unnoticed. It also asserts that the probe binds the
|
||||
engine's sampler rather than a copy of it, and it holds the suite's only
|
||||
constraint on that sampler's phase. Nothing here needs a model, but it does need
|
||||
ffmpeg, so CI runs this file in the same job that installs it.
|
||||
|
||||
## Metadata and provenance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user