feat: add per-file face_settings (min_confidence, min_size) support
- DB: Added face_settings jsonb column to monitor_jobs - API: RegisterFileRequest accepts face_settings - DB: create_monitor_job accepts and stores face_settings - MonitorJob struct includes face_settings field - Swift face processor will read from FACE_MIN_CONFIDENCE and FACE_MIN_SIZE env vars
This commit is contained in:
+8
-1
@@ -17,11 +17,18 @@ use crate::core::storage::content_hash;
|
||||
use crate::FileManager;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct FaceSettings {
|
||||
min_confidence: Option<f64>,
|
||||
min_size: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct RegisterFileRequest {
|
||||
file_path: String,
|
||||
user_id: Option<i64>,
|
||||
content_hash: Option<String>,
|
||||
pattern: Option<String>,
|
||||
face_settings: Option<FaceSettings>,
|
||||
#[serde(default = "default_force")]
|
||||
force: bool,
|
||||
}
|
||||
@@ -811,7 +818,7 @@ async fn register_file(
|
||||
.flatten();
|
||||
|
||||
if let Some(ref vp) = video_path {
|
||||
if let Ok(job) = auto_state.db.create_monitor_job(&auto_uuid, Some(vp)).await {
|
||||
if let Ok(job) = auto_state.db.create_monitor_job(&auto_uuid, Some(vp), None).await {
|
||||
tracing::info!("[AUTO-PIPELINE] Job {} created for {}", job.id, auto_uuid);
|
||||
let all_procs: Vec<&str> =
|
||||
vec!["cut", "asr", "asrx", "ocr", "face", "pose", "appearance"];
|
||||
|
||||
@@ -281,7 +281,7 @@ async fn trigger_processing(
|
||||
} else {
|
||||
state
|
||||
.db
|
||||
.create_monitor_job(&file_uuid, Some(&file_path))
|
||||
.create_monitor_job(&file_uuid, Some(&file_path), None)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tracing::error!(
|
||||
|
||||
Reference in New Issue
Block a user