fix: add Vignetting, Bokeh Shape, Fixed Pattern Noise suppression for MACRO_DSLR
Browse filesThree remaining false positive signals on macro DSLR images:
- Vignetting cos⁴θ (+0.40→+0.12): macro lenses have non-standard field illumination
- Bokeh Shape (+0.30→+0.09): macro bokeh is extremely smooth/circular from long focal length
- Fixed Pattern Noise (+0.20→+0.06): smooth bokeh background has low row/column variance
All suppressed at ×0.3 multiplier. Should push Optical Agent from +0.008 toward ~-0.02
and P(Fake) from 46.4% toward 44-45%, matching the portrait photo floor.
agents/modality_detector.py
CHANGED
|
@@ -1,5 +1,10 @@
|
|
| 1 |
"""
|
| 2 |
-
FORENSIQ — Capture Modality Detector
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
v5: Added minimum bayer_margin threshold (0.005) to prevent JPEG re-encoding
|
| 5 |
from creating false Bayer CFA patterns on AI images. Real cameras have
|
|
@@ -310,6 +315,7 @@ def _get_modality_adjustments(modality: str) -> dict:
|
|
| 310 |
"Noise Spatial Frequency": 0.2, "Poisson-Gaussian Model": 0.2,
|
| 311 |
"HF Noise Structure": 0.3, "Pixel Response Linearity": 0.4,
|
| 312 |
"Saturation Clipping": 0.4, "VAE Patch Boundaries": 0.3,
|
|
|
|
| 313 |
}
|
| 314 |
elif modality == "PORTRAIT_MODE":
|
| 315 |
return {
|
|
|
|
| 1 |
"""
|
| 2 |
+
FORENSIQ — Capture Modality Detector v6
|
| 3 |
+
|
| 4 |
+
v6: Added Vignetting cos⁴θ, Bokeh Shape, and Fixed Pattern Noise ×0.3 suppression
|
| 5 |
+
for MACRO_DSLR modality. Macro lenses have non-standard field illumination (not cos⁴θ),
|
| 6 |
+
extremely smooth circular bokeh from long focal length, and low row/column variance
|
| 7 |
+
in the smooth background region.
|
| 8 |
|
| 9 |
v5: Added minimum bayer_margin threshold (0.005) to prevent JPEG re-encoding
|
| 10 |
from creating false Bayer CFA patterns on AI images. Real cameras have
|
|
|
|
| 315 |
"Noise Spatial Frequency": 0.2, "Poisson-Gaussian Model": 0.2,
|
| 316 |
"HF Noise Structure": 0.3, "Pixel Response Linearity": 0.4,
|
| 317 |
"Saturation Clipping": 0.4, "VAE Patch Boundaries": 0.3,
|
| 318 |
+
"Vignetting cos⁴θ": 0.3, "Bokeh Shape": 0.3, "Fixed Pattern Noise": 0.3,
|
| 319 |
}
|
| 320 |
elif modality == "PORTRAIT_MODE":
|
| 321 |
return {
|