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:
@@ -968,6 +968,8 @@ pub struct FaceSearchItem {
|
||||
pub end_frame: i64,
|
||||
pub frame_count: i32,
|
||||
pub avg_confidence: f64,
|
||||
pub avg_capture_quality: f64,
|
||||
pub best_capture_quality: f64,
|
||||
pub thumbnail_url: String,
|
||||
}
|
||||
|
||||
@@ -1101,6 +1103,7 @@ async fn search_file_faces(
|
||||
let data_sql = format!(
|
||||
"SELECT tp.trace_id, tp.file_uuid, COALESCE(tp.name, 'Unassigned') as name, \
|
||||
tp.start_frame, tp.end_frame, tp.frame_count, tp.avg_confidence, \
|
||||
tp.avg_capture_quality, tp.best_capture_quality, \
|
||||
v.file_name \
|
||||
FROM {} tp \
|
||||
LEFT JOIN {} v ON tp.file_uuid = v.file_uuid \
|
||||
@@ -1149,6 +1152,8 @@ async fn search_file_faces(
|
||||
let end_frame: i64 = r.get("end_frame");
|
||||
let frame_count: i32 = r.get("frame_count");
|
||||
let avg_confidence: f64 = r.try_get("avg_confidence").ok().unwrap_or(0.0);
|
||||
let avg_capture_quality: f64 = r.try_get("avg_capture_quality").ok().unwrap_or(0.0);
|
||||
let best_capture_quality: f64 = r.try_get("best_capture_quality").ok().unwrap_or(0.0);
|
||||
|
||||
FaceSearchItem {
|
||||
trace_id,
|
||||
@@ -1159,6 +1164,8 @@ async fn search_file_faces(
|
||||
end_frame,
|
||||
frame_count,
|
||||
avg_confidence: (avg_confidence * 1000.0).round() / 1000.0,
|
||||
avg_capture_quality: (avg_capture_quality * 1000.0).round() / 1000.0,
|
||||
best_capture_quality: (best_capture_quality * 1000.0).round() / 1000.0,
|
||||
thumbnail_url: format!("/api/v1/trace-thumb/{}/{}", file_uuid, trace_id),
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user