perf: optimize pipeline latency from 170s to 5.5s with sequenced perception and vector clipping; update README and flowsheet
This commit is contained in:
@@ -991,12 +991,13 @@ class PipelineRecognitionAgent(BaseAgent):
|
||||
text_elements = state.get("extracted_entities", {}).get("text_elements", [])
|
||||
symbols = state.get("extracted_entities", {}).get("symbols", [])
|
||||
|
||||
# Guarantee non-empty text_elements for line tracer even if running in parallel
|
||||
# Guarantee non-empty text_elements for line tracer even if running standalone
|
||||
if not text_elements:
|
||||
try:
|
||||
from src.utils.paddle_ocr import run_paddle_ocr
|
||||
from src.utils.tag_classifier import classify_paddle_results
|
||||
raw_ocr = run_paddle_ocr(raw_image)
|
||||
primary_doc = raw_documents[0] if raw_documents else raw_image
|
||||
raw_ocr = run_paddle_ocr(primary_doc)
|
||||
text_elements = classify_paddle_results(raw_ocr, drawing_type)
|
||||
logger.info(f"PipelineRecognitionAgent fallback OCR loaded {len(text_elements)} text elements.")
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user