Specify face indexing at native resolution, and say what the proxy cost
FR-CULL-8 said detection runs against the thumbnail or proxy tier and never a full decode, and faces.md §5 said the aligned crop is sampled from that same proxy. Both are wrong in the same place: they treat detection and cropping as one resolution problem when they are two, with opposite answers. Detection does not care. §4.1 fixes the graph's input at 640x640 and letterboxes whatever arrives, so a face filling 2% of the frame reaches the model at 12px whether the buffer handed over is 1024px or 6000px. Every pixel above the detector's own input is discarded before inference. The crop cares about nothing else. §5's warp produces the fixed 112x112 ArcFace sees, so source resolution converts directly into whether those 112 pixels were photographed or interpolated. Reading crop_px across the 18,671 faces the proxy-tier implementation stored: 47.3% were upsampled to reach the embedder, 314 of them by more than 2x, the smallest from 34 source pixels. An upsampled crop does not fail loudly -- it yields a confident embedding of detail that was never there, and the damage appears three stages later as clusters that will not separate. So FR-CULL-8 now specifies four stages with the resolutions named separately: render native through FR-EXP-9's pipeline, downscale for the detector, map boxes and landmarks back to native, crop and align from the native render. The affordability the old rule bought is met instead by when the pass runs -- background, preempted, resumable -- and the requirement says plainly what it now costs on a remote library: the original rather than FR-NC-3's byte range, 412 GB across the reference library's 19,107 images, so a whole-library pass is a transfer under FR-NC-6 rather than something that may start on its own. MIN_CROP_EDGE replaces the MIN_DETECT_EDGE this branch briefly had. Same number, guarding the quantity that turned out to matter. faces.md §7b records both measurements, and marks the second as unexplained rather than dressing it as a finding. Grouped by the buffer detection ran against, faces per image was 0.078 at 1024 or below and 1.82 at 2048 or better, controlled for file type and size. That gap is real and reproducible and I cannot account for it, because the letterbox above says detector input should not matter. M4 is where it gets settled. The crop measurement does not depend on it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,11 +50,29 @@ pub enum FaceSweepMessage {
|
||||
Total(usize),
|
||||
/// One image finished, with the faces found in it.
|
||||
Indexed { image: ImageId, faces: usize },
|
||||
/// Images the pass gave up on, counted since the last message.
|
||||
///
|
||||
/// **Progress has to advance on these or it does not advance at all.**
|
||||
/// The count moved only on `Indexed`, so a run where every image failed
|
||||
/// sat at 0/169 from the first tick to the last and then reported
|
||||
/// success: the receiver was told the total, told nothing, and told the
|
||||
/// pass had ended. That is exactly what happened on the reference library
|
||||
/// for a day, and it is why the sweep was thought to be hanging when it
|
||||
/// was in fact finishing in fourteen seconds.
|
||||
///
|
||||
/// A batch rather than one message per image, because failures come back
|
||||
/// lane-sized and the interesting number is how many. The reason for each
|
||||
/// is logged where it happens.
|
||||
Failed { images: usize },
|
||||
/// The pass ended.
|
||||
Finished {
|
||||
images: usize,
|
||||
faces: usize,
|
||||
failed: usize,
|
||||
/// Refused for want of a big enough proxy rather than failed; see
|
||||
/// `docs/faces.md` §7c. Counted apart because a library of small
|
||||
/// scans is not a broken network and must not read as one.
|
||||
too_small: usize,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -351,6 +369,7 @@ pub fn spawn_store_face_sweep(
|
||||
images: 0,
|
||||
faces: 0,
|
||||
failed: 0,
|
||||
too_small: 0,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -508,6 +527,7 @@ pub fn spawn_store_face_sweep(
|
||||
images,
|
||||
faces: found,
|
||||
failed,
|
||||
too_small: 0,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user