Spaces:
Running
Running
github-actions[bot]
Deploy from GitHub 39b3777315c11d9c8bcd39ad7bf034f2a88a7379 (filtered: code + Dockerfile + README + NOTICES only)
2e175db | """ | |
| Frequency-domain detector (Stage 2). | |
| The intuition: many generators leave characteristic artefacts in the frequency | |
| spectrum (DCT/FFT) that are not visible to humans but are highly diagnostic. | |
| This detector complements CLIP-based semantic detection — when the generator | |
| fools CLIP, frequency artefacts often still betray it. | |
| NOT IMPLEMENTED in Stage 1. Wire the implementation in when the dataset is | |
| curated and we can validate the approach on held-out generators. | |
| """ | |
| from __future__ import annotations | |
| from PIL import Image | |
| from .base import Detector, DetectorResult | |
| class FrequencyDetector(Detector): | |
| name = "frequency_artifacts" | |
| def run(self, image: Image.Image) -> DetectorResult: # noqa: ARG002 | |
| raise NotImplementedError( | |
| "FrequencyDetector is reserved for Stage 2. " | |
| "Set ENABLE_FREQUENCY_DETECTOR=false in Stage 1." | |
| ) | |