Restructure: Move ocr_pipeline + labeling + crop into ocr/ package
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m25s
CI / test-python-agent-core (push) Successful in 19s
CI / test-nodejs-website (push) Successful in 20s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 21:51:43 +02:00
parent 59c400b9aa
commit 0504d22b8e
98 changed files with 10351 additions and 10152 deletions

View File

@@ -0,0 +1,34 @@
"""
Overlay image rendering for OCR pipeline — barrel re-export.
All implementation split into:
ocr_pipeline_overlay_structure — structure overlay (boxes, zones, colors, graphics)
ocr_pipeline_overlay_grid — columns, rows, words overlays
Lizenz: Apache 2.0
DATENSCHUTZ: Alle Verarbeitung erfolgt lokal.
"""
from fastapi import HTTPException
from fastapi.responses import Response
from .overlay_structure import _get_structure_overlay # noqa: F401
from .overlay_grid import ( # noqa: F401
_get_columns_overlay,
_get_rows_overlay,
_get_words_overlay,
)
async def render_overlay(overlay_type: str, session_id: str) -> Response:
"""Dispatch to the appropriate overlay renderer."""
if overlay_type == "structure":
return await _get_structure_overlay(session_id)
elif overlay_type == "columns":
return await _get_columns_overlay(session_id)
elif overlay_type == "rows":
return await _get_rows_overlay(session_id)
elif overlay_type == "words":
return await _get_words_overlay(session_id)
else:
raise HTTPException(status_code=400, detail=f"Unknown overlay type: {overlay_type}")