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:
Accusys
2026-08-13 10:12:21 +08:00
parent 71172fa354
commit 39e9ce4c3b
25 changed files with 723 additions and 131 deletions
+18
View File
@@ -97,6 +97,8 @@ pub enum SearchResult {
end_time: Option<f64>,
key_frame: Option<String>,
key_face: Option<String>,
avg_capture_quality: Option<f64>,
best_capture_quality: Option<f64>,
},
}
@@ -329,6 +331,8 @@ pub struct PeopleResult {
pub key_frame: Option<String>,
pub key_face: Option<String>,
pub avg_confidence: Option<f64>,
pub avg_capture_quality: Option<f64>,
pub best_capture_quality: Option<f64>,
}
async fn search_chunks(
@@ -604,6 +608,7 @@ async fn search_persons_internal(
"SELECT tp.file_uuid, tp.trace_id, tp.name, \
tp.start_frame, tp.end_frame, tp.frame_count, \
tp.key_frame, tp.key_face, tp.avg_confidence, \
tp.avg_capture_quality, tp.best_capture_quality, \
n.external_id \
FROM {} tp \
LEFT JOIN {} n ON n.file_uuid = tp.file_uuid \
@@ -643,6 +648,8 @@ async fn search_persons_internal(
Option<String>,
Option<String>,
Option<f64>,
Option<f64>,
Option<f64>,
Option<String>,
)> = sqlx::query_as(&sql).fetch_all(db.pool()).await?;
@@ -658,6 +665,8 @@ async fn search_persons_internal(
key_frame,
key_face,
avg_confidence,
avg_capture_quality,
best_capture_quality,
external_id,
) in rows
{
@@ -679,6 +688,8 @@ async fn search_persons_internal(
end_time: None,
key_frame,
key_face,
avg_capture_quality,
best_capture_quality,
});
}
@@ -780,6 +791,7 @@ async fn search_people_by_query(
"SELECT tp.file_uuid, tp.trace_id, tp.name, \
tp.start_frame, tp.end_frame, tp.frame_count, \
tp.key_frame, tp.key_face, tp.avg_confidence, \
tp.avg_capture_quality, tp.best_capture_quality, \
n.external_id \
FROM {} tp \
LEFT JOIN {} n ON n.file_uuid = tp.file_uuid \
@@ -819,6 +831,8 @@ async fn search_people_by_query(
Option<String>,
Option<String>,
Option<f64>,
Option<f64>,
Option<f64>,
Option<String>,
)> = sqlx::query_as(&sql).fetch_all(db.pool()).await?;
@@ -833,6 +847,8 @@ async fn search_people_by_query(
key_frame,
key_face,
avg_confidence,
avg_capture_quality,
best_capture_quality,
external_id,
) in rows
{
@@ -850,6 +866,8 @@ async fn search_people_by_query(
key_frame,
key_face,
avg_confidence,
avg_capture_quality,
best_capture_quality,
});
}