study(VR-012): quality knee over a joint size x blur grid, three blur families
Extends the VR-005 protocol -- hold out one mugshot per actor, degrade only the probe, match against a gallery held at native resolution, decide through the Platt calibration -- from one axis to two, over 1670 actors rather than 100. Joint rather than separable, because the interaction is the question: a 16 px face upscaled to 112 has already lost its high frequencies, so further blur costs it almost nothing, while the same blur at full resolution is expensive. Sweeping the axes independently would measure each with the other implicitly at its best and miss that entirely. Three blur families, compared at matched per-axis PSF spread rather than at equal raw parameter. Optical defocus is a uniform disc whose transfer function is a jinc with exact zeros, not a Gaussian that merely rolls off, and it is also how a face ends up large and useless -- the case a size filter cannot catch. Sweeping Gaussian alone, as the first version did, understates real lens blur by a factor of five in error rate. Every candidate measure is scored on every degraded crop and the candidates are ranked by how well each predicts the pipeline's actual decision, not by how smooth its synthetic ladder looks. Both a pooled and a within-cell AUC are reported: they answer different questions and the candidates rank differently under each. Runs through sae_embed throughout. Stages gains optional engine paths so the same study can drive a TRT build, which is what makes the full grid five minutes rather than four and a half hours. TRACES: VR-012, AR-028, AR-029 | SR-002
This commit is contained in:
@@ -183,10 +183,16 @@ DEDUP_SIM = 1.0 - 1e-7
|
||||
class Stages:
|
||||
"""Thin holder so the rest of the script has one object to call."""
|
||||
|
||||
def __init__(self, detector: str, arcface: str, conf: float, nms: float):
|
||||
def __init__(self, detector: str, arcface: str, conf: float, nms: float,
|
||||
detector_engine: str = "", arcface_engine: str = ""):
|
||||
# The engine paths are only consulted by a TRT-backend build, where they
|
||||
# are mandatory — that backend loads a pre-built .engine and will not
|
||||
# fall back to reading the .onnx. An ORT build ignores them, so passing
|
||||
# them unconditionally is safe and keeps one constructor for both.
|
||||
self.engine = sae_embed.FaceEmbedder(
|
||||
detector_model=detector, arcface_model=arcface,
|
||||
conf=conf, nms=nms, max_side=0)
|
||||
conf=conf, nms=nms, max_side=0,
|
||||
detector_engine=detector_engine, arcface_engine=arcface_engine)
|
||||
|
||||
def detect(self, img):
|
||||
return self.engine.detect(img)
|
||||
|
||||
Reference in New Issue
Block a user