From 125b16c8f7d5bf44aae60b5ac914b0969e5d5f55 Mon Sep 17 00:00:00 2001 From: sergio Date: Sun, 19 Apr 2026 13:34:48 +0200 Subject: [PATCH] presentation --- thesis_output/figures/figures | 1 + thesis_output/figures/unir_logo.png | Bin 0 -> 10596 bytes thesis_output/presentation.html | 1319 +++++++++++++++++ thesis_output/presentation/charts.js | 328 ++++ thesis_output/presentation/figures | 1 + thesis_output/presentation/index.html | 98 ++ .../presentation/slides/01_title.html | 12 + .../presentation/slides/02_agenda.html | 8 + .../presentation/slides/03_motivation.html | 26 + .../presentation/slides/04_problem.html | 26 + .../presentation/slides/05_objectives.html | 13 + .../presentation/slides/06_state_of_art.html | 37 + .../presentation/slides/07_methodology.html | 12 + .../presentation/slides/08_architecture.html | 24 + .../presentation/slides/09_search_space.html | 43 + .../presentation/slides/10_benchmark.html | 21 + .../presentation/slides/11_trials.html | 32 + .../presentation/slides/12_key_finding.html | 20 + .../presentation/slides/13_correlations.html | 20 + .../presentation/slides/14_validation.html | 21 + thesis_output/presentation/slides/15_gpu.html | 29 + .../slides/16_optimal_config.html | 30 + .../presentation/slides/17_conclusions.html | 43 + .../presentation/slides/18_future_work.html | 29 + .../presentation/slides/19_thanks.html | 11 + thesis_output/presentation/styles.css | 458 ++++++ 26 files changed, 2662 insertions(+) create mode 120000 thesis_output/figures/figures create mode 100644 thesis_output/figures/unir_logo.png create mode 100644 thesis_output/presentation.html create mode 100644 thesis_output/presentation/charts.js create mode 120000 thesis_output/presentation/figures create mode 100644 thesis_output/presentation/index.html create mode 100644 thesis_output/presentation/slides/01_title.html create mode 100644 thesis_output/presentation/slides/02_agenda.html create mode 100644 thesis_output/presentation/slides/03_motivation.html create mode 100644 thesis_output/presentation/slides/04_problem.html create mode 100644 thesis_output/presentation/slides/05_objectives.html create mode 100644 thesis_output/presentation/slides/06_state_of_art.html create mode 100644 thesis_output/presentation/slides/07_methodology.html create mode 100644 thesis_output/presentation/slides/08_architecture.html create mode 100644 thesis_output/presentation/slides/09_search_space.html create mode 100644 thesis_output/presentation/slides/10_benchmark.html create mode 100644 thesis_output/presentation/slides/11_trials.html create mode 100644 thesis_output/presentation/slides/12_key_finding.html create mode 100644 thesis_output/presentation/slides/13_correlations.html create mode 100644 thesis_output/presentation/slides/14_validation.html create mode 100644 thesis_output/presentation/slides/15_gpu.html create mode 100644 thesis_output/presentation/slides/16_optimal_config.html create mode 100644 thesis_output/presentation/slides/17_conclusions.html create mode 100644 thesis_output/presentation/slides/18_future_work.html create mode 100644 thesis_output/presentation/slides/19_thanks.html create mode 100644 thesis_output/presentation/styles.css diff --git a/thesis_output/figures/figures b/thesis_output/figures/figures new file mode 120000 index 0000000..7edfd1a --- /dev/null +++ b/thesis_output/figures/figures @@ -0,0 +1 @@ +../figures \ No newline at end of file diff --git a/thesis_output/figures/unir_logo.png b/thesis_output/figures/unir_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..8d8942b0f351ccad4213add112681795245bebb8 GIT binary patch literal 10596 zcmbW7b95$6x9DTrwr$K4+qN^YttWP#*qYdwU^0_TY&#Pt6Wg|K-uFA_-gVdg>)h^D zy?1r*+J&xFt9#cEq@pB^j6i?@1_p*KD1_mDRscXT(d|rpu-Y`D}xSN`^7+CEj z(a~on%tA-jQc)3%;ZuhLg9gU{gZ#(j^8^DY0E7Nl2LqD>C;Z>K8aUm5*+77SMcRNt z{g;j2r~Kzg{7j#v|4Tv^fd3zl1rYyj4IWSc`QJL2)<4CV6saCQ1-!G2t{WH_4)s3? zTvm}H9t;)?wr5?a@=U^y;E#py12Y*% zuQ!d)6NBzn5TTTa+`m-B24Z5XScLwUii`s-(H6Fz41Fmw+6qSRyfbZ6+7e&lSVKwf z!y98wd$MP#q3(6sQ_4mg;ATpgbL0G-^X6haid_~1926uWLP3U}2qyzY1@S-4ifo7l zJ=AOu|1l5lCYNy|_vY}HV0sH65{42+4ghD8{V&Hba1a|}f)X$RXjhVuC7lff|JJh^ zB()h+;SZNHa%q=H4=6}VPRsbW6_8NDzN!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iIJYFhe^T}9e;0G$1UAB*w-jZV8PokOj%${*dDfivPQ70=A%LHb z5tqvHH0oD0MGehGmM5pP5uv!GvXyiyRi_cx7a&VYO#2T^1q%l;RFJ0>*GaDJ8)QOR zP5&?A1j7VzqQco%0T9gNFquijPWczS`n28cb+Nsbb$kO4iTPe8LB#1rjk9Ga*F~?|2XWWTZwC2?uj5uM-)g?iC9K4XhLJ zlgphTxjwToJ_xU@_5a{k-7w%g;SHel9*kfkNfRnpQfL+kLc*1qGGFu8Pf#kKhq*ZJ t_%KH&fD#NY`F~F7{Xc|XfiU^y2X{cVx*-{I<3EI=tfZ1et(Zy3{{q)#0I2`~ literal 0 HcmV?d00001 diff --git a/thesis_output/presentation.html b/thesis_output/presentation.html new file mode 100644 index 0000000..a3797cb --- /dev/null +++ b/thesis_output/presentation.html @@ -0,0 +1,1319 @@ + + + + + + TFM - Optimización de Hiperparámetros OCR con Ray Tune + + + + + + +
+
+ + +
+ UNIR +
Trabajo Fin de Máster
+

Optimización de Hiperparámetros OCR con Ray Tune para Documentos Académicos en Español

+
+
+ Sergio Jiménez Jiménez
+ Director: Javier Rodrigo Villazón Terrazas
+ Máster Universitario en Inteligencia Artificial
+ 2025 +
+
+ + +
+

Agenda

+
1
Motivación y planteamiento del problema
+
2
Objetivos y estado del arte
+
3
Metodología y arquitectura
+
4
Resultados experimentales
+
5
Conclusiones y trabajo futuro
+
+ + +
+

Motivación

+
+
+
    +
  • La digitalización documental es una necesidad estratégica para organizaciones
  • +
  • OCR como puente entre el mundo físico y digital
  • +
  • Documentos en español: caracteres especiales ausentes en conjuntos de entrenamiento internacionales
  • +
  • Modelos preentrenados: rendimiento subóptimo fuera de benchmarks estándar
  • +
  • Fine-tuning requiere infraestructura costosa y datos etiquetados
  • +
+
+
+

Errores típicos en español

+ + + + + + + + +
OriginalOCRError
másmasPérdida de acento
añoanoPérdida de eñe
¿CómoComoSignos especiales
titulacióntitulacióonDuplicación
+
+
+
+ + +
+

Planteamiento del Problema

+
+ ¿Es posible mejorar significativamente el rendimiento de modelos OCR preentrenados para documentos en español mediante la optimización sistemática de hiperparámetros, sin requerir fine-tuning? +
+
+
+
Fine-tuning completo
Optimización de hiperparámetros
+
+
+
Datos
Miles de imágenes etiquetadas
Subconjunto de validación
+
+
+
Hardware
GPU alta memoria (>16 GB)
CPU / GPU consumo
+
+
+
Tiempo
Días / semanas
Minutos / horas
+
+
+
Expertise
Alto (ML avanzado)
Bajo-medio
+
+
+
Riesgo
Sobreajuste, catastrófico
Limitado, reversible
+
+
+
+ + +
+

Objetivos

+
+ Objetivo general: Optimizar PaddleOCR para documentos académicos en español alcanzando un CER < 2% sin fine-tuning del modelo base. +
+
    +
  • OE1: Comparar tres motores OCR open-source (EasyOCR, PaddleOCR, DocTR)
  • +
  • OE2: Preparar dataset de evaluación de 45 páginas con ground truth
  • +
  • OE3: Identificar hiperparámetros críticos mediante análisis de correlación
  • +
  • OE4: Ejecutar 64 trials de optimización con Ray Tune + Optuna
  • +
  • OE5: Validar la configuración optimizada frente al baseline
  • +
+
+ + +
+

Estado del Arte: Motores OCR

+
+
+

EasyOCR

+
JaidedAI
+
CRAFT + CRNN
+
    +
  • 80+ idiomas
  • +
  • Fácil de usar
  • +
  • Baja configurabilidad
  • +
+
+
+

PaddleOCR

+
Baidu / PaddlePaddle
+
DB + SVTR (PP-OCRv5)
+
    +
  • Alta configurabilidad
  • +
  • Pipeline modular
  • +
  • Soporte español dedicado
  • +
+
+
+

DocTR

+
Mindee
+
DB/LinkNet + CRNN/SAR
+
    +
  • TF y PyTorch
  • +
  • Soporte español limitado
  • +
  • Rápido en inferencia
  • +
+
+
+ Pipeline OCR +
Pipeline de un sistema OCR moderno
+
+ + +
+

Metodología: 5 Fases

+ Metodología +
Fases de la metodología experimental
+
+
1
Preparación del dataset
PDF → 300 DPI + GT
+
2
Benchmark comparativo
3 motores, CER/WER
+
3
Espacio de búsqueda
7 hiperparámetros
+
4
Optimización
64 trials, TPE
+
5
Validación
45 páginas completas
+
+
+ + +
+

Arquitectura: Microservicios Docker

+
+
+ Arquitectura +
Arquitectura de microservicios para optimización OCR
+
+
+
    +
  • Contenedor Ray Tune: Orquestador de trials (Optuna TPE)
  • +
  • Contenedor OCR: PaddleOCR con acceso GPU
  • +
  • Comunicación: REST API (HTTP POST /evaluate)
  • +
  • Respuesta: JSON {CER, WER, TIME}
  • +
  • Docker Compose: Despliegue reproducible
  • +
+
+ Hardware:
+ RTX 3060 Laptop (5.66 GB VRAM)
+ AMD Ryzen 7 5800H
+ 16 GB DDR4 | Ubuntu 24.04 +
+
+
+
+ + +
+

Espacio de Búsqueda: 7 Hiperparámetros

+
+
+ + + + + + + + + + + +
ParámetroTipoRango
textline_orientationBooleanoTrue / False
use_doc_orientation_classifyBooleanoTrue / False
use_doc_unwarpingBooleanoTrue / False
text_det_threshContinuo[0.01, 0.50]
text_det_box_threshContinuo[0.01, 0.90]
text_rec_score_threshContinuo[0.01, 0.99]
text_det_unclip_ratioFijo0.0
+
+
+ Ray Tune Cycle +
Ciclo de optimización con Ray Tune y Optuna
+
+ Algoritmo: TPE (Tree-structured Parzen Estimator)
+ Trials: 64 | Concurrencia: 2 workers
+ Métrica: Minimizar CER +
+
+
+
+ + +
+

Resultados: Benchmark Comparativo

+
+
+ +
+
+ + + + + + + +
MotorCERWERs/págVRAM
EasyOCR11.23%36.36%1.88~2 GB
PaddleOCR7.76%11.62%0.580.06 GB
DocTR12.06%42.01%0.50~1 GB
+
+ PaddleOCR seleccionado: Mejor CER (7.76%) con el menor consumo de VRAM (0.06 GB) y alta configurabilidad. +
+
+
+
+ + +
+

Resultados: 64 Trials de Optimización

+
+
+ +
+
+
+
+
0.79%
+
Mejor CER (Trial #1)
+
+
+
0.87%
+
Mediana CER
+
+
+
7.30%
+
Peor CER
+
+
+
67.2%
+
Trials con CER < 2%
+
+
+
+ 0 fallos en 64 trials
+ Tiempo total: ~5 minutos (GPU) +
+
+
+
+ + +
+

Hallazgo Clave: textline_orientation

+
+
+ +
+
+
+
-63.2%
+
Reducción en CER
+
+
    +
  • Un único parámetro booleano tiene mayor impacto que todos los umbrales numéricos combinados
  • +
  • Decisiones arquitecturales > ajustes numéricos finos
  • +
  • Crítico para documentos con layouts complejos (índices, listas, encabezados)
  • +
  • 52 de 64 trials (81%) lo activaron automáticamente (Optuna aprendió rápido)
  • +
+
+
+
+ + +
+

Análisis de Hiperparámetros

+
+
+

Correlación Pearson con CER

+
+ +
+
+
+

Importancia de Hiperparámetros

+
+ +
+
+
+
+ Insight: use_doc_unwarping (+0.88) es perjudicial en PDFs digitales (añade procesamiento innecesario). Los parámetros booleanos (arquitecturales) dominan sobre los umbrales numéricos. +
+
+ + +
+

Validación: Baseline vs Optimizado

+
+
+ +
+
+ + + + + + + +
MétricaBaselineOptimizadoMejora
CER (45 pág)8.85%7.72%-12.8%
WER (45 pág)13.05%11.40%-12.6%
CER (mejor trial, 5 pág)7.76%0.79%-89.8%
+
+ Nota: La diferencia entre el mejor trial (0.79%) y la validación completa (7.72%) evidencia sobreajuste al subconjunto de 5 páginas usado en la optimización. Un subconjunto más amplio (15-20 páginas) mejoraría la generalización. +
+
+
+
+ + +
+

Aceleración GPU

+
+
+ +
+
+
+
+
82x
+
Factor de aceleración
+
+
+
0.84 s
+
GPU: segundos por página
+
+
+
69.4 s
+
CPU: segundos por página
+
+
+
+ 64 trials × 5 páginas:
+ CPU: ~6.2 horas
+ GPU: ~5 minutos +
+
+
+
+ + +
+

Configuración Óptima

+
+
+
+ config_optimizada = {
+   "textline_orientation": True,  # CRÍTICO
+   "use_doc_orientation_classify": True,
+   "use_doc_unwarping": False,  # Innecesario
+   "text_det_thresh": 0.0462,
+   "text_det_box_thresh": 0.4862,
+   "text_det_unclip_ratio": 0.0,
+   "text_rec_score_thresh": 0.5658,
+ } +
+
+
+

Insights clave

+
    +
  • textline_orientation = True: Parámetro más impactante (-63.2% CER)
  • +
  • use_doc_unwarping = False: Procesamiento innecesario para PDFs digitales
  • +
  • text_det_thresh bajo: Captura más regiones de texto, reduce omisiones
  • +
  • Parámetros booleanos dominan sobre umbrales numéricos
  • +
+
+ Esta configuración es directamente aplicable a otros documentos académicos en español con layouts similares. +
+
+
+
+ + +
+

Conclusiones

+
+
+

Contribuciones

+
+
1
+
Metodología reproducible para optimización de hiperparámetros OCR con código abierto
+
+
+
2
+
Análisis sistemático de hiperparámetros PaddleOCR con correlaciones Pearson
+
+
+
3
+
Configuración validada para documentos académicos en español (CER 0.79%)
+
+
+
4
+
Infraestructura dockerizada reproducible con imágenes públicas
+
+
+
+

Limitaciones

+
+
!
+
Un único tipo de documento (académico UNIR)
+
+
+
!
+
Corpus modesto (45 páginas)
+
+
+
!
+
Sobreajuste al subconjunto de optimización (5 páginas)
+
+
+
!
+
text_det_unclip_ratio no explorado
+
+
+
+
+ + +
+

Líneas de Trabajo Futuro

+
+
+

Extensiones inmediatas

+
    +
  • Validación cruzada en otros tipos de documentos (facturas, formularios, manuscritos)
  • +
  • Subconjunto de optimización más amplio (15-20 páginas)
  • +
  • Exploración de text_det_unclip_ratio
  • +
+
+
+

Líneas de investigación

+
    +
  • Transfer learning de hiperparámetros entre dominios
  • +
  • Optimización multi-objetivo (CER + WER + velocidad)
  • +
  • Comparación rigurosa HPO vs fine-tuning
  • +
+
+
+

Aplicaciones prácticas

+
    +
  • Herramienta de configuración automática por tipo de documento
  • +
  • Integración en pipelines de producción
  • +
  • Benchmark público de OCR en español
  • +
+
+
+
+ + +
+ UNIR +

Gracias

+
Preguntas?
+
+
+ Sergio Jiménez Jiménez
+ Máster Universitario en Inteligencia Artificial
+ Universidad Internacional de La Rioja (UNIR) | 2025 +
+
+ +
+
+ + + + + diff --git a/thesis_output/presentation/charts.js b/thesis_output/presentation/charts.js new file mode 100644 index 0000000..2ea7bce --- /dev/null +++ b/thesis_output/presentation/charts.js @@ -0,0 +1,328 @@ +// Chart instances +const charts = {}; + +// UNIR Colors +const BLUE = '#0098CD'; +const BLUE_DARK = '#007AA3'; +const LIGHT = '#E6F4F9'; +const RED = '#E8654A'; +const ORANGE = '#F0A030'; +const GREEN = '#2EAD4B'; +const GRAY = '#CCCCCC'; + +// Common chart options +const commonOptions = { + responsive: true, + maintainAspectRatio: true, + animation: { duration: 1200, easing: 'easeOutQuart' }, + plugins: { legend: { display: false } } +}; + +function createBenchmarkChart() { + const ctx = document.getElementById('chartBenchmark'); + if (!ctx || charts.benchmark) return; + charts.benchmark = new Chart(ctx, { + type: 'bar', + data: { + labels: ['EasyOCR', 'PaddleOCR', 'DocTR'], + datasets: [ + { + label: 'CER (%)', + data: [11.23, 7.76, 12.06], + backgroundColor: [GRAY, BLUE, GRAY], + borderColor: [GRAY, BLUE_DARK, GRAY], + borderWidth: 2, + borderRadius: 6, + barPercentage: 0.6 + }, + { + label: 'WER (%)', + data: [36.36, 11.62, 42.01], + backgroundColor: ['rgba(204,204,204,0.4)', 'rgba(0,152,205,0.4)', 'rgba(204,204,204,0.4)'], + borderColor: [GRAY, BLUE, GRAY], + borderWidth: 2, + borderRadius: 6, + barPercentage: 0.6 + } + ] + }, + options: { + ...commonOptions, + indexAxis: 'y', + plugins: { + legend: { display: true, position: 'top', labels: { font: { family: 'Calibri', size: 12 } } } + }, + scales: { + x: { title: { display: true, text: 'Error Rate (%)', font: { family: 'Calibri' } }, grid: { color: '#f0f0f0' } }, + y: { grid: { display: false }, ticks: { font: { family: 'Calibri', size: 14, weight: 'bold' } } } + } + } + }); +} + +function createTrialsChart() { + const ctx = document.getElementById('chartTrials'); + if (!ctx || charts.trials) return; + charts.trials = new Chart(ctx, { + type: 'doughnut', + data: { + labels: ['CER < 1%', 'CER 1-2%', 'CER 2-5%', 'CER 5-10%'], + datasets: [{ + data: [15, 28, 10, 11], + backgroundColor: [BLUE_DARK, BLUE, '#7EC8E3', GRAY], + borderColor: 'white', + borderWidth: 3, + hoverOffset: 8 + }] + }, + options: { + ...commonOptions, + cutout: '55%', + plugins: { + legend: { + display: true, + position: 'bottom', + labels: { font: { family: 'Calibri', size: 12 }, padding: 15, usePointStyle: true, pointStyle: 'rectRounded' } + } + } + } + }); +} + +function createTextlineChart() { + const ctx = document.getElementById('chartTextline'); + if (!ctx || charts.textline) return; + charts.textline = new Chart(ctx, { + type: 'bar', + data: { + labels: ['False', 'True'], + datasets: [{ + label: 'CER medio (%)', + data: [4.73, 1.74], + backgroundColor: [GRAY, BLUE], + borderColor: ['#aaa', BLUE_DARK], + borderWidth: 2, + borderRadius: 8, + barPercentage: 0.5 + }] + }, + options: { + ...commonOptions, + scales: { + y: { + beginAtZero: true, + max: 6, + title: { display: true, text: 'CER (%)', font: { family: 'Calibri', size: 13 } }, + grid: { color: '#f0f0f0' } + }, + x: { + title: { display: true, text: 'textline_orientation', font: { family: 'Calibri', size: 13, weight: 'bold' } }, + grid: { display: false }, + ticks: { font: { family: 'Calibri', size: 16, weight: 'bold' } } + } + }, + plugins: { + legend: { display: false }, + tooltip: { + callbacks: { + label: (ctx) => `CER: ${ctx.parsed.y}%` + } + } + } + } + }); +} + +function createCorrelationChart() { + const ctx = document.getElementById('chartCorrelation'); + if (!ctx || charts.correlation) return; + const params = [ + 'use_doc_unwarping', + 'text_det_thresh', + 'text_det_box_thresh', + 'text_rec_score_thresh', + 'textline_orientation', + 'use_doc_orient_classify' + ]; + const values = [0.879, 0.428, 0.311, -0.268, -0.535, -0.712]; + const colors = values.map(v => v > 0 ? RED : BLUE); + + charts.correlation = new Chart(ctx, { + type: 'bar', + data: { + labels: params, + datasets: [{ + data: values, + backgroundColor: colors, + borderColor: colors.map(c => c === RED ? '#C04030' : BLUE_DARK), + borderWidth: 1.5, + borderRadius: 4, + barPercentage: 0.65 + }] + }, + options: { + ...commonOptions, + indexAxis: 'y', + scales: { + x: { + min: -1, max: 1, + title: { display: true, text: 'Correlación Pearson', font: { family: 'Calibri', size: 11 } }, + grid: { color: (ctx) => ctx.tick.value === 0 ? '#666' : '#f0f0f0' } + }, + y: { + grid: { display: false }, + ticks: { font: { family: 'Consolas, monospace', size: 10 } } + } + } + } + }); +} + +function createImportanceChart() { + const ctx = document.getElementById('chartImportance'); + if (!ctx || charts.importance) return; + const params = [ + 'use_doc_unwarping', + 'use_doc_orient_classify', + 'textline_orientation', + 'text_det_thresh', + 'text_det_box_thresh', + 'text_rec_score_thresh' + ]; + const values = [0.879, 0.712, 0.535, 0.428, 0.311, 0.268]; + const colors = values.map((_, i) => { + const alpha = 1 - (i * 0.12); + return `rgba(0, 152, 205, ${alpha})`; + }); + + charts.importance = new Chart(ctx, { + type: 'bar', + data: { + labels: params, + datasets: [{ + data: values, + backgroundColor: colors, + borderColor: BLUE_DARK, + borderWidth: 1, + borderRadius: 4, + barPercentage: 0.65 + }] + }, + options: { + ...commonOptions, + indexAxis: 'y', + scales: { + x: { + beginAtZero: true, max: 1, + title: { display: true, text: '|Correlación|', font: { family: 'Calibri', size: 11 } }, + grid: { color: '#f0f0f0' } + }, + y: { + grid: { display: false }, + ticks: { font: { family: 'Consolas, monospace', size: 10 } } + } + } + } + }); +} + +function createValidationChart() { + const ctx = document.getElementById('chartValidation'); + if (!ctx || charts.validation) return; + charts.validation = new Chart(ctx, { + type: 'bar', + data: { + labels: ['CER (45 pág)', 'WER (45 pág)', 'CER (mejor trial)'], + datasets: [ + { + label: 'Baseline', + data: [8.85, 13.05, 7.76], + backgroundColor: 'rgba(204,204,204,0.7)', + borderColor: '#aaa', + borderWidth: 2, + borderRadius: 6, + barPercentage: 0.7 + }, + { + label: 'Optimizado', + data: [7.72, 11.40, 0.79], + backgroundColor: BLUE, + borderColor: BLUE_DARK, + borderWidth: 2, + borderRadius: 6, + barPercentage: 0.7 + } + ] + }, + options: { + ...commonOptions, + plugins: { + legend: { display: true, position: 'top', labels: { font: { family: 'Calibri', size: 13 } } } + }, + scales: { + y: { + beginAtZero: true, + title: { display: true, text: 'Error Rate (%)', font: { family: 'Calibri' } }, + grid: { color: '#f0f0f0' } + }, + x: { + grid: { display: false }, + ticks: { font: { family: 'Calibri', size: 12 } } + } + } + } + }); +} + +function createGPUChart() { + const ctx = document.getElementById('chartGPU'); + if (!ctx || charts.gpu) return; + charts.gpu = new Chart(ctx, { + type: 'bar', + data: { + labels: ['CPU (Ryzen 7 5800H)', 'GPU (RTX 3060)'], + datasets: [{ + label: 'Segundos por página', + data: [69.4, 0.84], + backgroundColor: [ORANGE, BLUE], + borderColor: ['#CC8020', BLUE_DARK], + borderWidth: 2, + borderRadius: 8, + barPercentage: 0.5 + }] + }, + options: { + ...commonOptions, + indexAxis: 'y', + scales: { + x: { + beginAtZero: true, + title: { display: true, text: 'Segundos por página', font: { family: 'Calibri', size: 13 } }, + grid: { color: '#f0f0f0' } + }, + y: { + grid: { display: false }, + ticks: { font: { family: 'Calibri', size: 14, weight: 'bold' } } + } + }, + plugins: { + legend: { display: false }, + tooltip: { + callbacks: { + label: (ctx) => `${ctx.parsed.x} s/página` + } + } + } + } + }); +} + +// Chart creation map +const chartCreators = { + benchmark: createBenchmarkChart, + trials: createTrialsChart, + textline: createTextlineChart, + correlations: () => { createCorrelationChart(); createImportanceChart(); }, + validation: createValidationChart, + gpu: createGPUChart +}; diff --git a/thesis_output/presentation/figures b/thesis_output/presentation/figures new file mode 120000 index 0000000..7edfd1a --- /dev/null +++ b/thesis_output/presentation/figures @@ -0,0 +1 @@ +../figures \ No newline at end of file diff --git a/thesis_output/presentation/index.html b/thesis_output/presentation/index.html new file mode 100644 index 0000000..d2dc930 --- /dev/null +++ b/thesis_output/presentation/index.html @@ -0,0 +1,98 @@ + + + + + + TFM - Optimización de Hiperparámetros OCR con Ray Tune + + + + + + +
+
+ +
+ +
+
+ + + + + + diff --git a/thesis_output/presentation/slides/01_title.html b/thesis_output/presentation/slides/01_title.html new file mode 100644 index 0000000..6d3573c --- /dev/null +++ b/thesis_output/presentation/slides/01_title.html @@ -0,0 +1,12 @@ +
+ UNIR +
Trabajo Fin de Máster
+

Optimización de Hiperparámetros OCR con Ray Tune para Documentos Académicos en Español

+
+
+ Sergio Jiménez Jiménez
+ Director: Javier Rodrigo Villazón Terrazas
+ Máster Universitario en Inteligencia Artificial
+ 2025 +
+
diff --git a/thesis_output/presentation/slides/02_agenda.html b/thesis_output/presentation/slides/02_agenda.html new file mode 100644 index 0000000..96b9584 --- /dev/null +++ b/thesis_output/presentation/slides/02_agenda.html @@ -0,0 +1,8 @@ +
+

Agenda

+
1
Motivación y planteamiento del problema
+
2
Objetivos y estado del arte
+
3
Metodología y arquitectura
+
4
Resultados experimentales
+
5
Conclusiones y trabajo futuro
+
diff --git a/thesis_output/presentation/slides/03_motivation.html b/thesis_output/presentation/slides/03_motivation.html new file mode 100644 index 0000000..709bb12 --- /dev/null +++ b/thesis_output/presentation/slides/03_motivation.html @@ -0,0 +1,26 @@ +
+

Motivación

+
+
+
    +
  • La digitalización documental es una necesidad estratégica para organizaciones
  • +
  • OCR como puente entre el mundo físico y digital
  • +
  • Documentos en español: caracteres especiales ausentes en conjuntos de entrenamiento internacionales
  • +
  • Modelos preentrenados: rendimiento subóptimo fuera de benchmarks estándar
  • +
  • Fine-tuning requiere infraestructura costosa y datos etiquetados
  • +
+
+
+

Errores típicos en español

+ + + + + + + + +
OriginalOCRError
másmasPérdida de acento
añoanoPérdida de eñe
¿CómoComoSignos especiales
titulacióntitulacióonDuplicación
+
+
+
diff --git a/thesis_output/presentation/slides/04_problem.html b/thesis_output/presentation/slides/04_problem.html new file mode 100644 index 0000000..12ff260 --- /dev/null +++ b/thesis_output/presentation/slides/04_problem.html @@ -0,0 +1,26 @@ +
+

Planteamiento del Problema

+
+ ¿Es posible mejorar significativamente el rendimiento de modelos OCR preentrenados para documentos en español mediante la optimización sistemática de hiperparámetros, sin requerir fine-tuning? +
+
+
+
Fine-tuning completo
Optimización de hiperparámetros
+
+
+
Datos
Miles de imágenes etiquetadas
Subconjunto de validación
+
+
+
Hardware
GPU alta memoria (>16 GB)
CPU / GPU consumo
+
+
+
Tiempo
Días / semanas
Minutos / horas
+
+
+
Expertise
Alto (ML avanzado)
Bajo-medio
+
+
+
Riesgo
Sobreajuste, catastrófico
Limitado, reversible
+
+
+
diff --git a/thesis_output/presentation/slides/05_objectives.html b/thesis_output/presentation/slides/05_objectives.html new file mode 100644 index 0000000..75b2934 --- /dev/null +++ b/thesis_output/presentation/slides/05_objectives.html @@ -0,0 +1,13 @@ +
+

Objetivos

+
+ Objetivo general: Optimizar PaddleOCR para documentos académicos en español alcanzando un CER < 2% sin fine-tuning del modelo base. +
+
    +
  • OE1: Comparar tres motores OCR open-source (EasyOCR, PaddleOCR, DocTR)
  • +
  • OE2: Preparar dataset de evaluación de 45 páginas con ground truth
  • +
  • OE3: Identificar hiperparámetros críticos mediante análisis de correlación
  • +
  • OE4: Ejecutar 64 trials de optimización con Ray Tune + Optuna
  • +
  • OE5: Validar la configuración optimizada frente al baseline
  • +
+
diff --git a/thesis_output/presentation/slides/06_state_of_art.html b/thesis_output/presentation/slides/06_state_of_art.html new file mode 100644 index 0000000..da2e6c3 --- /dev/null +++ b/thesis_output/presentation/slides/06_state_of_art.html @@ -0,0 +1,37 @@ +
+

Estado del Arte: Motores OCR

+
+
+

EasyOCR

+
JaidedAI
+
CRAFT + CRNN
+
    +
  • 80+ idiomas
  • +
  • Fácil de usar
  • +
  • Baja configurabilidad
  • +
+
+
+

PaddleOCR

+
Baidu / PaddlePaddle
+
DB + SVTR (PP-OCRv5)
+
    +
  • Alta configurabilidad
  • +
  • Pipeline modular
  • +
  • Soporte español dedicado
  • +
+
+
+

DocTR

+
Mindee
+
DB/LinkNet + CRNN/SAR
+
    +
  • TF y PyTorch
  • +
  • Soporte español limitado
  • +
  • Rápido en inferencia
  • +
+
+
+ Pipeline OCR +
Pipeline de un sistema OCR moderno
+
diff --git a/thesis_output/presentation/slides/07_methodology.html b/thesis_output/presentation/slides/07_methodology.html new file mode 100644 index 0000000..3b779fa --- /dev/null +++ b/thesis_output/presentation/slides/07_methodology.html @@ -0,0 +1,12 @@ +
+

Metodología: 5 Fases

+ Metodología +
Fases de la metodología experimental
+
+
1
Preparación del dataset
PDF → 300 DPI + GT
+
2
Benchmark comparativo
3 motores, CER/WER
+
3
Espacio de búsqueda
7 hiperparámetros
+
4
Optimización
64 trials, TPE
+
5
Validación
45 páginas completas
+
+
diff --git a/thesis_output/presentation/slides/08_architecture.html b/thesis_output/presentation/slides/08_architecture.html new file mode 100644 index 0000000..72f1e2e --- /dev/null +++ b/thesis_output/presentation/slides/08_architecture.html @@ -0,0 +1,24 @@ +
+

Arquitectura: Microservicios Docker

+
+
+ Arquitectura +
Arquitectura de microservicios para optimización OCR
+
+
+
    +
  • Contenedor Ray Tune: Orquestador de trials (Optuna TPE)
  • +
  • Contenedor OCR: PaddleOCR con acceso GPU
  • +
  • Comunicación: REST API (HTTP POST /evaluate)
  • +
  • Respuesta: JSON {CER, WER, TIME}
  • +
  • Docker Compose: Despliegue reproducible
  • +
+
+ Hardware:
+ RTX 3060 Laptop (5.66 GB VRAM)
+ AMD Ryzen 7 5800H
+ 16 GB DDR4 | Ubuntu 24.04 +
+
+
+
diff --git a/thesis_output/presentation/slides/09_search_space.html b/thesis_output/presentation/slides/09_search_space.html new file mode 100644 index 0000000..ca1a3df --- /dev/null +++ b/thesis_output/presentation/slides/09_search_space.html @@ -0,0 +1,43 @@ +
+

Espacio de Búsqueda: 7 Hiperparámetros

+
+
+ + + + + + + + + + + +
ParámetroTipoRangoDescripción
textline_orientationBooleanoTrue / FalseOrientación de líneas de texto
use_doc_orientation_classifyBooleanoTrue / FalseClasificación de orientación
use_doc_unwarpingBooleanoTrue / FalseCorrección de deformaciones
text_det_threshContinuo[0.01, 0.50]Umbral binarización probabilidad
text_det_box_threshContinuo[0.01, 0.90]Confianza caja de texto
text_rec_score_threshContinuo[0.01, 0.99]Confianza del reconocedor
text_det_unclip_ratioFijo0.0Expansión de cajas (no explorado)
+
+
+ Discretos / Booleanos (3)True | False
+ Solo 2 valores por parámetro (8 combinaciones). Interruptores on/off de módulos del pipeline. Decisiones arquitecturales: cambian qué se ejecuta. +
+
+ Continuos / Float (3)0.01 ← → 0.99
+ Valores reales muestreados uniformemente. Infinitos valores, grid search inviable. Ajustan sensibilidad de detección y reconocimiento. +
+
+ Fijo (1)0.0
+ Constante en todos los trials. Trabajo futuro. +
+
+
+
+ Ray Tune Cycle +
Ciclo de optimización con Ray Tune y Optuna
+
+ Algoritmo: TPE (Tree-structured Parzen Estimator)
+ Trials: 64 | Concurrencia: 2 workers
+ Métrica: Minimizar CER
+ Combinaciones: 2³ × ∞³ = espacio mixto discreto-continuo +
+
+
+
diff --git a/thesis_output/presentation/slides/10_benchmark.html b/thesis_output/presentation/slides/10_benchmark.html new file mode 100644 index 0000000..b939248 --- /dev/null +++ b/thesis_output/presentation/slides/10_benchmark.html @@ -0,0 +1,21 @@ +
+

Resultados: Benchmark Comparativo

+
+
+ +
+
+ + + + + + + +
MotorCERWERs/págVRAM
EasyOCR11.23%36.36%1.88~2 GB
PaddleOCR7.76%11.62%0.580.06 GB
DocTR12.06%42.01%0.50~1 GB
+
+ PaddleOCR seleccionado: Mejor CER (7.76%) con el menor consumo de VRAM (0.06 GB) y alta configurabilidad. +
+
+
+
diff --git a/thesis_output/presentation/slides/11_trials.html b/thesis_output/presentation/slides/11_trials.html new file mode 100644 index 0000000..4908874 --- /dev/null +++ b/thesis_output/presentation/slides/11_trials.html @@ -0,0 +1,32 @@ +
+

Resultados: 64 Trials de Optimización

+
+
+ +
+
+
+
+
0.79%
+
Mejor CER (Trial #1)
+
+
+
0.87%
+
Mediana CER
+
+
+
7.30%
+
Peor CER
+
+
+
67.2%
+
Trials con CER < 2%
+
+
+
+ 0 fallos en 64 trials
+ Tiempo total: ~5 minutos (GPU) +
+
+
+
diff --git a/thesis_output/presentation/slides/12_key_finding.html b/thesis_output/presentation/slides/12_key_finding.html new file mode 100644 index 0000000..d400fe4 --- /dev/null +++ b/thesis_output/presentation/slides/12_key_finding.html @@ -0,0 +1,20 @@ +
+

Hallazgo Clave: textline_orientation

+
+
+ +
+
+
+
-63.2%
+
Reducción en CER
+
+
    +
  • Un único parámetro booleano tiene mayor impacto que todos los umbrales numéricos combinados
  • +
  • Decisiones arquitecturales > ajustes numéricos finos
  • +
  • Crítico para documentos con layouts complejos (índices, listas, encabezados)
  • +
  • 52 de 64 trials (81%) lo activaron automáticamente (Optuna aprendió rápido)
  • +
+
+
+
diff --git a/thesis_output/presentation/slides/13_correlations.html b/thesis_output/presentation/slides/13_correlations.html new file mode 100644 index 0000000..dc23166 --- /dev/null +++ b/thesis_output/presentation/slides/13_correlations.html @@ -0,0 +1,20 @@ +
+

Análisis de Hiperparámetros

+
+
+

Correlación Pearson con CER

+
+ +
+
+
+

Importancia de Hiperparámetros

+
+ +
+
+
+
+ Insight: use_doc_unwarping (+0.88) es perjudicial en PDFs digitales (añade procesamiento innecesario). Los parámetros booleanos (arquitecturales) dominan sobre los umbrales numéricos. +
+
diff --git a/thesis_output/presentation/slides/14_validation.html b/thesis_output/presentation/slides/14_validation.html new file mode 100644 index 0000000..937c675 --- /dev/null +++ b/thesis_output/presentation/slides/14_validation.html @@ -0,0 +1,21 @@ +
+

Validación: Baseline vs Optimizado

+
+
+ +
+
+ + + + + + + +
MétricaBaselineOptimizadoMejora
CER (45 pág)8.85%7.72%-12.8%
WER (45 pág)13.05%11.40%-12.6%
CER (mejor trial, 5 pág)7.76%0.79%-89.8%
+
+ Nota: La diferencia entre el mejor trial (0.79%) y la validación completa (7.72%) evidencia sobreajuste al subconjunto de 5 páginas usado en la optimización. Un subconjunto más amplio (15-20 páginas) mejoraría la generalización. +
+
+
+
diff --git a/thesis_output/presentation/slides/15_gpu.html b/thesis_output/presentation/slides/15_gpu.html new file mode 100644 index 0000000..c2dcb54 --- /dev/null +++ b/thesis_output/presentation/slides/15_gpu.html @@ -0,0 +1,29 @@ +
+

Aceleración GPU

+
+
+ +
+
+
+
+
82x
+
Factor de aceleración
+
+
+
0.84 s
+
GPU: segundos por página
+
+
+
69.4 s
+
CPU: segundos por página
+
+
+
+ 64 trials × 5 páginas:
+ CPU: ~6.2 horas
+ GPU: ~5 minutos +
+
+
+
diff --git a/thesis_output/presentation/slides/16_optimal_config.html b/thesis_output/presentation/slides/16_optimal_config.html new file mode 100644 index 0000000..89ffcaa --- /dev/null +++ b/thesis_output/presentation/slides/16_optimal_config.html @@ -0,0 +1,30 @@ +
+

Configuración Óptima

+
+
+
+ config_optimizada = {
+   "textline_orientation": True,  # CRÍTICO
+   "use_doc_orientation_classify": True,
+   "use_doc_unwarping": False,  # Innecesario
+   "text_det_thresh": 0.0462,
+   "text_det_box_thresh": 0.4862,
+   "text_det_unclip_ratio": 0.0,
+   "text_rec_score_thresh": 0.5658,
+ } +
+
+
+

Insights clave

+
    +
  • textline_orientation = True: Parámetro más impactante (-63.2% CER)
  • +
  • use_doc_unwarping = False: Procesamiento innecesario para PDFs digitales
  • +
  • text_det_thresh bajo: Captura más regiones de texto, reduce omisiones
  • +
  • Parámetros booleanos dominan sobre umbrales numéricos
  • +
+
+ Esta configuración es directamente aplicable a otros documentos académicos en español con layouts similares. +
+
+
+
diff --git a/thesis_output/presentation/slides/17_conclusions.html b/thesis_output/presentation/slides/17_conclusions.html new file mode 100644 index 0000000..489ef4b --- /dev/null +++ b/thesis_output/presentation/slides/17_conclusions.html @@ -0,0 +1,43 @@ +
+

Conclusiones

+
+
+

Contribuciones

+
+
1
+
Metodología reproducible para optimización de hiperparámetros OCR con código abierto
+
+
+
2
+
Análisis sistemático de hiperparámetros PaddleOCR con correlaciones Pearson
+
+
+
3
+
Configuración validada para documentos académicos en español (CER 0.79%)
+
+
+
4
+
Infraestructura dockerizada reproducible con imágenes públicas
+
+
+
+

Limitaciones

+
+
!
+
Un único tipo de documento (académico UNIR)
+
+
+
!
+
Corpus modesto (45 páginas)
+
+
+
!
+
Sobreajuste al subconjunto de optimización (5 páginas)
+
+
+
!
+
text_det_unclip_ratio no explorado
+
+
+
+
diff --git a/thesis_output/presentation/slides/18_future_work.html b/thesis_output/presentation/slides/18_future_work.html new file mode 100644 index 0000000..dc41156 --- /dev/null +++ b/thesis_output/presentation/slides/18_future_work.html @@ -0,0 +1,29 @@ +
+

Líneas de Trabajo Futuro

+
+
+

Extensiones inmediatas

+
    +
  • Validación cruzada en otros tipos de documentos (facturas, formularios, manuscritos)
  • +
  • Subconjunto de optimización más amplio (15-20 páginas)
  • +
  • Exploración de text_det_unclip_ratio
  • +
+
+
+

Líneas de investigación

+
    +
  • Transfer learning de hiperparámetros entre dominios
  • +
  • Optimización multi-objetivo (CER + WER + velocidad)
  • +
  • Comparación rigurosa HPO vs fine-tuning
  • +
+
+
+

Aplicaciones prácticas

+
    +
  • Herramienta de configuración automática por tipo de documento
  • +
  • Integración en pipelines de producción
  • +
  • Benchmark público de OCR en español
  • +
+
+
+
diff --git a/thesis_output/presentation/slides/19_thanks.html b/thesis_output/presentation/slides/19_thanks.html new file mode 100644 index 0000000..4638ce8 --- /dev/null +++ b/thesis_output/presentation/slides/19_thanks.html @@ -0,0 +1,11 @@ +
+ UNIR +

Gracias

+
Preguntas?
+
+
+ Sergio Jiménez Jiménez
+ Máster Universitario en Inteligencia Artificial
+ Universidad Internacional de La Rioja (UNIR) | 2025 +
+
diff --git a/thesis_output/presentation/styles.css b/thesis_output/presentation/styles.css new file mode 100644 index 0000000..ece9e6b --- /dev/null +++ b/thesis_output/presentation/styles.css @@ -0,0 +1,458 @@ +:root { + --unir-blue: #0098CD; + --unir-blue-dark: #007AA3; + --unir-light: #E6F4F9; + --unir-text: #404040; + --unir-gray: #E7E6E6; + --unir-red: #E8654A; + --unir-orange: #F0A030; +} + +.reveal { + font-family: 'Calibri', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; + font-size: 28px; + color: var(--unir-text); +} + +.reveal h1, .reveal h2, .reveal h3 { + font-family: 'Calibri Light', 'Calibri', 'Segoe UI', Arial, sans-serif; + color: var(--unir-blue); + text-transform: none; + letter-spacing: -0.02em; + font-weight: 600; +} + +.reveal h1 { font-size: 1.8em; } +.reveal h2 { font-size: 1.4em; margin-bottom: 0.6em; } +.reveal h3 { font-size: 1.1em; } + +.reveal .slides section { + text-align: left; + padding: 20px 40px; +} + +/* Corner logo on all slides except title */ +.reveal .slides section:not(.title-slide)::after { + content: ''; + position: absolute; + top: 15px; + right: 20px; + width: 110px; + height: 30px; + background: url('figures/unir_logo.png') no-repeat center; + background-size: contain; + opacity: 0.8; +} + +/* Bottom accent line - fixed to viewport bottom */ +#bottom-bar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 4px; + background: linear-gradient(90deg, var(--unir-blue), var(--unir-light)); + z-index: 50; + pointer-events: none; +} + +/* Title slide */ +.title-slide { + text-align: center !important; +} +.title-slide h1 { + font-size: 1.5em !important; + line-height: 1.3; + margin-top: 0.2em; +} +.title-slide .subtitle { + color: var(--unir-blue); + font-size: 0.75em; + font-weight: 600; + margin-bottom: 0.5em; + text-transform: uppercase; + letter-spacing: 0.1em; +} +.title-slide .meta { + font-size: 0.65em; + color: #666; + line-height: 1.8; +} +.title-slide .meta strong { + color: var(--unir-text); +} +.title-slide .logo-large { + width: 220px; + margin-bottom: 10px; +} +.title-slide .divider { + width: 120px; + height: 3px; + background: var(--unir-blue); + margin: 15px auto; +} + +/* Thank you slide */ +.thanks-slide { + text-align: center !important; +} +.thanks-slide h1 { + font-size: 2.5em !important; + margin-bottom: 0.3em; +} +.thanks-slide .questions { + font-size: 1.2em; + color: #666; + margin-bottom: 1em; +} + +/* Two column layout */ +.two-columns { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 30px; + align-items: start; +} +.two-columns-60-40 { + display: grid; + grid-template-columns: 3fr 2fr; + gap: 30px; + align-items: start; +} +.two-columns-40-60 { + display: grid; + grid-template-columns: 2fr 3fr; + gap: 30px; + align-items: start; +} +.three-columns { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 20px; + align-items: start; +} + +/* Highlight box */ +.highlight-box { + background: var(--unir-light); + border-left: 5px solid var(--unir-blue); + padding: 15px 20px; + border-radius: 0 8px 8px 0; + margin: 15px 0; + font-size: 0.85em; +} +.highlight-box.center-box { + border-left: none; + border-top: 3px solid var(--unir-blue); + border-radius: 0 0 8px 8px; + text-align: center; +} + +/* Metric cards */ +.metric-cards { + display: flex; + gap: 15px; + flex-wrap: wrap; + justify-content: center; +} +.metric-card { + background: white; + border: 2px solid var(--unir-light); + border-radius: 12px; + padding: 15px 20px; + text-align: center; + min-width: 130px; + box-shadow: 0 2px 8px rgba(0,0,0,0.06); + transition: transform 0.2s; +} +.metric-card:hover { + transform: translateY(-2px); +} +.metric-card .number { + font-size: 1.6em; + font-weight: 700; + color: var(--unir-blue); + line-height: 1.2; +} +.metric-card .number.success { color: #2EAD4B; } +.metric-card .number.warning { color: var(--unir-orange); } +.metric-card .number.danger { color: var(--unir-red); } +.metric-card .label { + font-size: 0.6em; + color: #888; + margin-top: 4px; +} + +/* Data table */ +.data-table { + width: 100%; + border-collapse: collapse; + font-size: 0.75em; + margin: 10px 0; +} +.data-table thead th { + background: var(--unir-blue); + color: white; + padding: 10px 14px; + text-align: left; + font-weight: 600; +} +.data-table thead th:first-child { + border-radius: 8px 0 0 0; +} +.data-table thead th:last-child { + border-radius: 0 8px 0 0; +} +.data-table tbody td { + padding: 8px 14px; + border-bottom: 1px solid var(--unir-gray); +} +.data-table tbody tr:nth-child(even) { + background: #FAFCFE; +} +.data-table tbody tr.highlight { + background: var(--unir-light); + font-weight: 600; +} +.data-table tbody tr:last-child td:first-child { + border-radius: 0 0 0 8px; +} +.data-table tbody tr:last-child td:last-child { + border-radius: 0 0 8px 0; +} + +/* Engine cards */ +.engine-card { + background: white; + border: 2px solid var(--unir-gray); + border-radius: 12px; + padding: 18px; + text-align: center; + transition: all 0.3s; +} +.engine-card.selected { + border-color: var(--unir-blue); + background: var(--unir-light); + box-shadow: 0 4px 16px rgba(0,152,205,0.2); +} +.engine-card h3 { + margin: 0 0 5px 0; + font-size: 0.9em; +} +.engine-card .developer { + font-size: 0.55em; + color: #999; + margin-bottom: 10px; +} +.engine-card .arch { + font-size: 0.6em; + color: var(--unir-text); + background: var(--unir-light); + border-radius: 6px; + padding: 4px 8px; + display: inline-block; + margin-bottom: 8px; +} +.engine-card.selected .arch { + background: white; +} +.engine-card ul { + text-align: left; + font-size: 0.6em; + margin: 0; + padding-left: 16px; +} + +/* Agenda items */ +.agenda-item { + display: flex; + align-items: center; + gap: 15px; + margin: 12px 0; + font-size: 0.85em; +} +.agenda-number { + width: 36px; + height: 36px; + background: var(--unir-blue); + color: white; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-weight: 700; + font-size: 0.9em; + flex-shrink: 0; +} + +/* Tags */ +.tag { + display: inline-block; + background: var(--unir-light); + color: var(--unir-blue-dark); + border-radius: 20px; + padding: 3px 12px; + font-size: 0.6em; + font-weight: 600; + margin: 2px; +} +.tag.bool { background: #FFF3E0; color: #E65100; } +.tag.cont { background: #E8F5E9; color: #2E7D32; } +.tag.fixed { background: var(--unir-gray); color: #888; } + +/* Chart containers */ +.chart-container { + position: relative; + width: 100%; + max-height: 420px; +} +.chart-container canvas { + max-height: 420px; +} + +/* Bullet lists */ +.reveal ul, .reveal ol { + font-size: 0.8em; + line-height: 1.6; +} +.reveal li { + margin-bottom: 6px; +} + +/* Compact list */ +.compact-list { font-size: 0.7em; } +.compact-list li { margin-bottom: 3px; } + +/* Objective check */ +.obj-list { + list-style: none; + padding: 0; + font-size: 0.72em; +} +.obj-list li { + padding: 6px 0 6px 30px; + position: relative; +} +.obj-list li::before { + content: ''; + position: absolute; + left: 0; + top: 8px; + width: 18px; + height: 18px; + border: 2px solid var(--unir-blue); + border-radius: 50%; +} +.obj-list li.done::before { + background: var(--unir-blue); + box-shadow: inset 0 0 0 3px white; +} + +/* Conclusion items */ +.contribution-item { + display: flex; + align-items: start; + gap: 10px; + margin: 8px 0; + font-size: 0.72em; +} +.contribution-icon { + width: 28px; + height: 28px; + background: var(--unir-blue); + color: white; + border-radius: 6px; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + flex-shrink: 0; +} +.limitation-icon { + width: 28px; + height: 28px; + background: var(--unir-orange); + color: white; + border-radius: 6px; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + flex-shrink: 0; +} + +/* Figure caption */ +.fig-caption { + text-align: center; + font-size: 0.55em; + color: #999; + font-style: italic; + margin-top: 5px; +} + +/* Comparison table for fine-tuning vs HPO */ +.compare-row { + display: grid; + grid-template-columns: 140px 1fr 1fr; + gap: 0; + font-size: 0.65em; +} +.compare-row.header > div { + background: var(--unir-blue); + color: white; + padding: 8px 12px; + font-weight: 600; +} +.compare-row > div { + padding: 6px 12px; + border-bottom: 1px solid var(--unir-gray); +} +.compare-row .label-col { + font-weight: 600; + background: #FAFCFE; +} +.compare-row .highlight-col { + background: var(--unir-light); +} + +/* Slide number */ +.reveal .slide-number { + color: var(--unir-blue); + font-size: 14px; + font-family: 'Calibri', sans-serif; +} + +/* Progress bar */ +.reveal .progress span { + background: var(--unir-blue); +} + +/* Improvements arrow */ +.improvement { + color: #2EAD4B; + font-weight: 700; + font-size: 0.8em; +} + +/* Code/param names */ +code, .param { + font-family: 'Consolas', 'Courier New', monospace; + background: var(--unir-light); + padding: 2px 6px; + border-radius: 4px; + font-size: 0.85em; +} + +/* Section divider */ +.section-divider { + text-align: center !important; +} +.section-divider h2 { + font-size: 1.8em !important; +} +.section-divider .section-number { + font-size: 3em; + color: var(--unir-blue); + opacity: 0.2; + font-weight: 700; +}