fix: add min_capture_quality to FaceFilterSettings + trace profile fixes
- Add min_capture_quality to FaceFilterSettings (file_profile.rs) - Fix store_traced_faces.py: load embeddings from Qdrant with_vector=True - Fix face_tracker.py: force new traces when frame_gap > 30 - Fix backfill_trace_profiles.py: key_frame select=eq(n,N), bbox scaling, best_frame - Add best_frame to FaceTraceProfile (Rust + Python) - Fix min_capture_quality persistence in file-profile API
This commit is contained in:
@@ -819,6 +819,8 @@ pub struct IdentityTraceInfo {
|
||||
pub first_sec: f64,
|
||||
pub last_sec: f64,
|
||||
pub avg_confidence: f64,
|
||||
pub avg_capture_quality: f64,
|
||||
pub best_capture_quality: f64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
@@ -1088,6 +1090,15 @@ pub async fn get_identity_traces(
|
||||
.filter_map(|p| p["payload"]["confidence"].as_f64())
|
||||
.sum::<f64>()
|
||||
/ frame_count as f64;
|
||||
let avg_capture_quality = points
|
||||
.iter()
|
||||
.filter_map(|p| p["payload"]["capture_quality"].as_f64())
|
||||
.sum::<f64>()
|
||||
/ frame_count as f64;
|
||||
let best_capture_quality = points
|
||||
.iter()
|
||||
.filter_map(|p| p["payload"]["capture_quality"].as_f64())
|
||||
.fold(0.0_f64, f64::max);
|
||||
let fps = fps_cache.get(file_uuid).copied().unwrap_or(30.0);
|
||||
|
||||
traces.push(IdentityTraceInfo {
|
||||
@@ -1107,6 +1118,8 @@ pub async fn get_identity_traces(
|
||||
0.0
|
||||
},
|
||||
avg_confidence: (avg_confidence * 10000.0).round() / 10000.0,
|
||||
avg_capture_quality: (avg_capture_quality * 10000.0).round() / 10000.0,
|
||||
best_capture_quality: (best_capture_quality * 10000.0).round() / 10000.0,
|
||||
});
|
||||
}
|
||||
traces.sort_by(|a, b| a.trace_id.cmp(&b.trace_id));
|
||||
|
||||
Reference in New Issue
Block a user