feat(engine): HDF5-native galleries with embedded calibration; TensorRT backends; scene detection
Gallery format switches from JSON to HDF5 exclusively (JSON read-only kept for back-compat): save_gallery always writes HDF5, and the fitted Platt-sigmoid calibration (a, b, valid, hash) is now embedded directly in the gallery file instead of a sidecar .calib_cache.json — identity_matcher reads it from the loaded gallery and writes back only when the embeddings actually changed (hash mismatch), skipping the O(n^2) refit otherwise. Also includes: TensorRT inference backend support (ort_backend.cpp, trt_backend.cpp), gemm_backend improvements, TransNetV2-based scene-boundary detection wired through frame_source/face_tracker/main, and CMake build target updates for the new sources. Bumps the KPN submodule to feature/persistent-pipeline-reuse (push_blocking backpressure, node_ptr/node_stats introspection, ObjectVariantNodeWrapper for stateful functors) — needed by the optimizer's sae_kpn Python bindings.
This commit is contained in:
@@ -26,10 +26,15 @@ struct FaceDetectorFunc {
|
||||
|
||||
auto faces = detector_->detect(f.image);
|
||||
|
||||
// Drop faces below minimum pixel size (too small for reliable ArcFace alignment)
|
||||
// Drop faces below minimum pixel size (too small for reliable ArcFace
|
||||
// alignment). Note: when dense_scale downscaled the frame, both the
|
||||
// detection coords and min_face_px are in downscaled space — so scale
|
||||
// the threshold down to match, keeping the physical size cutoff constant.
|
||||
const float min_px = (f.bbox_upscale != 1.f)
|
||||
? min_face_px_ / f.bbox_upscale : min_face_px_;
|
||||
faces.erase(
|
||||
std::remove_if(faces.begin(), faces.end(), [&](const DetectedFace& d) {
|
||||
return d.bbox.width < min_face_px_ || d.bbox.height < min_face_px_;
|
||||
return d.bbox.width < min_px || d.bbox.height < min_px;
|
||||
}),
|
||||
faces.end());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user