From b6cf793e1bea749ae731aece22f88ba975de81be Mon Sep 17 00:00:00 2001 From: Accusys Date: Sat, 24 Oct 2026 12:55:51 +0800 Subject: [PATCH] feat: add detailed logging for scene VLM tags generation - Log tags count and content after generation - Log JSON extraction and parsing status - Log parsed objects and tags count - Helps debug why vlm_tags may be empty in some cases --- src/core/processor/scene_vlm.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/core/processor/scene_vlm.rs b/src/core/processor/scene_vlm.rs index 935fa12c..fbd28936 100644 --- a/src/core/processor/scene_vlm.rs +++ b/src/core/processor/scene_vlm.rs @@ -655,7 +655,9 @@ Rules: // Parse structured JSON; fall back to heuristic extraction if it fails. if let Some(json_str) = Self::extract_json_object(&content) { + tracing::debug!("[Scene VLM] Extracted JSON object ({} chars)", json_str.len()); if let Ok(parsed) = serde_json::from_str::(json_str) { + tracing::debug!("[Scene VLM] Successfully parsed JSON"); let description = parsed .get("summary") .and_then(|v| v.as_str()) @@ -673,6 +675,11 @@ Rules: }) .unwrap_or_default(); let tags = Self::parse_tags(parsed.get("tags")); + tracing::info!( + "[Scene VLM] Parsed {} objects, {} tags from JSON", + objects.len(), + tags.len() + ); return Ok((description, objects, tags)); } } @@ -721,6 +728,13 @@ Rules: scene.vlm_description = Some(description_en.clone()); scene.vlm_objects = objects.clone(); scene.vlm_tags = tags.clone(); + + tracing::info!( + "[Scene VLM] Scene {}: Generated {} tags: {:?}", + idx, + tags.len(), + tags + ); // Generate localized description by translation if needed if preferred_language != "en" {