feat: face fix deployment + trace_* regeneration + executor stderr filter fix

- swift_face.swift: frame rounding (.rounded()), conf 0.75, min_size 64
- trace_* directories regenerated for KOBA (37 traces, start_frame 5307)
- executor.rs: stderr filter now logs all non-empty stderr (was discarding)
- VAD not skippable in ASRX (main_fixed.py Step 2 always runs)
- Step 2.5 sentence boundary refinement added
- Cluster agent async endpoints + similarity transparency
- Keyword search: relationship text extraction, priority ordering
- Face fix handoff doc for Studio team
This commit is contained in:
Accusys
2026-08-05 00:13:50 +08:00
parent 36a704e3d3
commit 3d13a06bd9
42 changed files with 3447 additions and 778 deletions
+45 -12
View File
@@ -52,7 +52,10 @@ fn ffmpeg_cmd() -> std::process::Command {
pub fn bbox_routes() -> Router<crate::api::types::AppState> {
Router::new()
.route("/api/v1/face-thumbnail", get(face_thumbnail_compat))
.route("/api/v1/trace-thumb/:file_uuid/:trace_id", get(trace_thumbnail))
.route(
"/api/v1/trace-thumb/:file_uuid/:trace_id",
get(trace_thumbnail),
)
.route(
"/api/v1/file/:file_uuid/video/bbox",
get(bbox_overlay_video),
@@ -711,16 +714,42 @@ async fn stream_video(
if has_range {
let (start_sec, dur) = if let (Some(sf), Some(ef)) = (start_frame_param, end_frame_param) {
let _fps: f64 = sqlx::query_scalar(&format!(
"SELECT COALESCE(fps, 24.0) FROM {} WHERE file_uuid = $1",
videos_table
))
.bind(&file_uuid)
.fetch_optional(state.db.pool())
.await
.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?
.unwrap_or(24.0);
(sf / _fps, ((ef - sf).max(0.0) + 1.0) / _fps)
// Get fps from DB, but prefer actual fps from nb_frames/duration
let (db_fps, nb_frames, duration): (f64, Option<String>, Option<f64>) =
sqlx::query_as(&format!(
"SELECT COALESCE(fps, 24.0) as fps,
probe_json->'streams'->0->>'nb_frames' as nb_frames,
duration
FROM {} WHERE file_uuid = $1",
videos_table
))
.bind(&file_uuid)
.fetch_optional(state.db.pool())
.await
.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?
.unwrap_or((24.0, None, None));
let actual_fps =
if let (Some(nb), Some(dur)) = (&nb_frames, duration) {
if let Ok(n) = nb.parse::<f64>() {
if dur > 0.0 && n > 0.0 {
let fps = n / dur;
tracing::info!(
"[stream_video] Using actual fps: {} / {} = {:.2} fps (stored: {:.2})",
n, dur, fps, db_fps
);
fps
} else {
db_fps
}
} else {
db_fps
}
} else {
db_fps
};
(sf / actual_fps, ((ef - sf).max(0.0) + 1.0) / actual_fps)
} else if let (Some(st), Some(et)) = (start_time_param, end_time_param) {
(st, et - st)
} else if let (Some(s), Some(e)) = (start_legacy, end_legacy) {
@@ -887,7 +916,11 @@ async fn trace_thumbnail(
}
let bytes = tokio::fs::read(&key_face_path).await.map_err(|e| {
tracing::warn!("[trace-thumb] Failed to read {}: {}", key_face_path.display(), e);
tracing::warn!(
"[trace-thumb] Failed to read {}: {}",
key_face_path.display(),
e
);
StatusCode::INTERNAL_SERVER_ERROR
})?;