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:
+11
-5
@@ -11,7 +11,10 @@ use std::time::Instant;
|
||||
|
||||
use super::types::AppState;
|
||||
use crate::core::cache::{keys, RedisCache};
|
||||
use crate::core::config::REDIS_KEY_PREFIX;
|
||||
use crate::core::config::{
|
||||
FACE_FILTER_CONFIDENCE_PCT_DEFAULT, FACE_MIN_CONFIDENCE_DEFAULT, FACE_MIN_SIZE_DEFAULT,
|
||||
REDIS_KEY_PREFIX,
|
||||
};
|
||||
use crate::core::db::schema;
|
||||
use crate::core::db::{
|
||||
Database, MonitorJobStatus, PostgresDb, ProgressMessage, RedisClient, VideoRecord, VideoStatus,
|
||||
@@ -279,15 +282,18 @@ async fn trigger_processing(
|
||||
// (videos.face_filter, min_confidence 0-100) → None (caller uses Apple Vision defaults 0.5/1).
|
||||
let face_settings_json = if let Some(fs) = req.face_settings.as_ref() {
|
||||
Some(serde_json::json!({
|
||||
"min_confidence": fs.min_confidence.unwrap_or(0.5),
|
||||
"min_size": fs.min_size.unwrap_or(1)
|
||||
"min_confidence": fs.min_confidence.unwrap_or(FACE_MIN_CONFIDENCE_DEFAULT),
|
||||
"min_size": fs.min_size.unwrap_or(FACE_MIN_SIZE_DEFAULT)
|
||||
}))
|
||||
} else if let Some(v) = face_filter.as_ref() {
|
||||
let min_conf_pct = v
|
||||
.get("min_confidence")
|
||||
.and_then(|x| x.as_f64())
|
||||
.unwrap_or(50.0);
|
||||
let min_size = v.get("min_size").and_then(|x| x.as_i64()).unwrap_or(1) as i32;
|
||||
.unwrap_or(FACE_FILTER_CONFIDENCE_PCT_DEFAULT);
|
||||
let min_size = v
|
||||
.get("min_size")
|
||||
.and_then(|x| x.as_i64())
|
||||
.unwrap_or(FACE_MIN_SIZE_DEFAULT as i64) as i32;
|
||||
Some(serde_json::json!({
|
||||
"min_confidence": min_conf_pct / 100.0,
|
||||
"min_size": min_size
|
||||
|
||||
Reference in New Issue
Block a user