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
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:
@@ -1,34 +1,4 @@
|
||||
"""
|
||||
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 ocr_pipeline_overlay_structure import _get_structure_overlay # noqa: F401
|
||||
from ocr_pipeline_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}")
|
||||
# Backward-compat shim -- module moved to ocr/pipeline/overlays.py
|
||||
import importlib as _importlib
|
||||
import sys as _sys
|
||||
_sys.modules[__name__] = _importlib.import_module("ocr.pipeline.overlays")
|
||||
|
||||
Reference in New Issue
Block a user