diff --git a/admin-lehrer/app/(admin)/ai/ocr-pipeline/types.ts b/admin-lehrer/app/(admin)/ai/ocr-pipeline/types.ts index 917dd75..ce4de3a 100644 --- a/admin-lehrer/app/(admin)/ai/ocr-pipeline/types.ts +++ b/admin-lehrer/app/(admin)/ai/ocr-pipeline/types.ts @@ -65,7 +65,7 @@ export interface DewarpGroundTruth { export interface PageRegion { type: 'column_en' | 'column_de' | 'column_example' | 'page_ref' - | 'column_marker' | 'column_text' | 'header' | 'footer' + | 'column_marker' | 'column_text' | 'column_ignore' | 'header' | 'footer' x: number y: number width: number diff --git a/admin-lehrer/components/ocr-pipeline/ColumnControls.tsx b/admin-lehrer/components/ocr-pipeline/ColumnControls.tsx index e551c98..df2d2ad 100644 --- a/admin-lehrer/components/ocr-pipeline/ColumnControls.tsx +++ b/admin-lehrer/components/ocr-pipeline/ColumnControls.tsx @@ -19,6 +19,7 @@ const TYPE_COLORS: Record = { column_text: 'bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400', page_ref: 'bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400', column_marker: 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400', + column_ignore: 'bg-gray-100 text-gray-500 dark:bg-gray-700/30 dark:text-gray-500', header: 'bg-gray-100 text-gray-600 dark:bg-gray-700/50 dark:text-gray-400', footer: 'bg-gray-100 text-gray-600 dark:bg-gray-700/50 dark:text-gray-400', } @@ -30,6 +31,7 @@ const TYPE_LABELS: Record = { column_text: 'Text', page_ref: 'Seite', column_marker: 'Marker', + column_ignore: 'Ignorieren', header: 'Header', footer: 'Footer', } diff --git a/admin-lehrer/components/ocr-pipeline/ManualColumnEditor.tsx b/admin-lehrer/components/ocr-pipeline/ManualColumnEditor.tsx index deea2d6..4994410 100644 --- a/admin-lehrer/components/ocr-pipeline/ManualColumnEditor.tsx +++ b/admin-lehrer/components/ocr-pipeline/ManualColumnEditor.tsx @@ -10,6 +10,7 @@ const COLUMN_TYPES: { value: ColumnTypeKey; label: string }[] = [ { value: 'column_text', label: 'Text' }, { value: 'page_ref', label: 'Seite' }, { value: 'column_marker', label: 'Marker' }, + { value: 'column_ignore', label: 'Ignorieren' }, ] const TYPE_OVERLAY_COLORS: Record = { @@ -19,6 +20,7 @@ const TYPE_OVERLAY_COLORS: Record = { column_text: 'rgba(6, 182, 212, 0.12)', page_ref: 'rgba(168, 85, 247, 0.12)', column_marker: 'rgba(239, 68, 68, 0.12)', + column_ignore: 'rgba(128, 128, 128, 0.06)', } const TYPE_BADGE_COLORS: Record = { @@ -28,6 +30,7 @@ const TYPE_BADGE_COLORS: Record = { column_text: 'bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400', page_ref: 'bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400', column_marker: 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400', + column_ignore: 'bg-gray-100 text-gray-500 dark:bg-gray-700/30 dark:text-gray-500', } // Default column type sequence for newly created columns diff --git a/klausur-service/backend/ocr_pipeline_api.py b/klausur-service/backend/ocr_pipeline_api.py index 1c1f070..7315f49 100644 --- a/klausur-service/backend/ocr_pipeline_api.py +++ b/klausur-service/backend/ocr_pipeline_api.py @@ -753,6 +753,7 @@ async def _get_columns_overlay(session_id: str) -> Response: "column_text": (200, 200, 0), # Cyan/Turquoise "page_ref": (200, 0, 200), # Purple "column_marker": (0, 0, 220), # Red + "column_ignore": (180, 180, 180), # Light Gray "header": (128, 128, 128), # Gray "footer": (128, 128, 128), # Gray }