From 9c59ff0f6d3b31b0f84edfc4cfa20b22f68a0209 Mon Sep 17 00:00:00 2001 From: sergio Date: Sun, 19 Apr 2026 13:50:51 +0200 Subject: [PATCH] Slides adjust --- thesis_output/presentation/charts.js | 59 ++++++++++++------- .../presentation/slides/09_search_space.html | 6 +- .../presentation/slides/12_key_finding.html | 23 ++++---- .../slides/16_optimal_config.html | 2 +- 4 files changed, 54 insertions(+), 36 deletions(-) diff --git a/thesis_output/presentation/charts.js b/thesis_output/presentation/charts.js index 2ea7bce..6aa52f3 100644 --- a/thesis_output/presentation/charts.js +++ b/thesis_output/presentation/charts.js @@ -89,43 +89,58 @@ function createTrialsChart() { }); } -function createTextlineChart() { - const ctx = document.getElementById('chartTextline'); - if (!ctx || charts.textline) return; - charts.textline = new Chart(ctx, { +function createImpactChart() { + const ctx = document.getElementById('chartImpact'); + if (!ctx || charts.impact) return; + const params = [ + 'use_doc_unwarping', + 'textline_orientation', + 'use_doc_orient_classify', + 'text_det_thresh', + 'text_det_box_thresh', + 'text_rec_score_thresh' + ]; + const correlations = [0.879, -0.535, -0.712, 0.428, 0.311, -0.268]; + const absValues = correlations.map(Math.abs); + // Sort by absolute value descending + const indices = absValues.map((_, i) => i).sort((a, b) => absValues[b] - absValues[a]); + const sortedParams = indices.map(i => params[i]); + const sortedCorr = indices.map(i => correlations[i]); + const colors = sortedCorr.map(v => v > 0 ? RED : BLUE); + const borderColors = sortedCorr.map(v => v > 0 ? '#C04030' : BLUE_DARK); + + charts.impact = new Chart(ctx, { type: 'bar', data: { - labels: ['False', 'True'], + labels: sortedParams, datasets: [{ - label: 'CER medio (%)', - data: [4.73, 1.74], - backgroundColor: [GRAY, BLUE], - borderColor: ['#aaa', BLUE_DARK], - borderWidth: 2, - borderRadius: 8, - barPercentage: 0.5 + data: sortedCorr, + backgroundColor: colors, + borderColor: borderColors, + borderWidth: 1.5, + borderRadius: 4, + barPercentage: 0.65 }] }, options: { ...commonOptions, + indexAxis: 'y', 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' } }, + min: -1, max: 1, + title: { display: true, text: 'Correlación con CER (rojo = perjudica, azul = mejora)', font: { family: 'Calibri', size: 10 } }, + grid: { color: (ctx) => ctx.tick.value === 0 ? '#666' : '#f0f0f0' } + }, + y: { grid: { display: false }, - ticks: { font: { family: 'Calibri', size: 16, weight: 'bold' } } + ticks: { font: { family: 'Consolas, monospace', size: 11 } } } }, plugins: { legend: { display: false }, tooltip: { callbacks: { - label: (ctx) => `CER: ${ctx.parsed.y}%` + label: (ctx) => `Correlación: ${ctx.parsed.x > 0 ? '+' : ''}${ctx.parsed.x.toFixed(3)}` } } } @@ -321,7 +336,7 @@ function createGPUChart() { const chartCreators = { benchmark: createBenchmarkChart, trials: createTrialsChart, - textline: createTextlineChart, + impact: createImpactChart, correlations: () => { createCorrelationChart(); createImportanceChart(); }, validation: createValidationChart, gpu: createGPUChart diff --git a/thesis_output/presentation/slides/09_search_space.html b/thesis_output/presentation/slides/09_search_space.html index ca1a3df..2249590 100644 --- a/thesis_output/presentation/slides/09_search_space.html +++ b/thesis_output/presentation/slides/09_search_space.html @@ -16,15 +16,15 @@
- Discretos / Booleanos (3)True | False
+ 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
+ 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
+ Fijo (1): 0.0
Constante en todos los trials. Trabajo futuro.
diff --git a/thesis_output/presentation/slides/12_key_finding.html b/thesis_output/presentation/slides/12_key_finding.html index d400fe4..8321c02 100644 --- a/thesis_output/presentation/slides/12_key_finding.html +++ b/thesis_output/presentation/slides/12_key_finding.html @@ -1,20 +1,23 @@ -
-

Hallazgo Clave: textline_orientation

+
+

Hallazgo: Jerarquía de Impacto de Hiperparámetros

- +
-
-
-63.2%
-
Reducción en CER
+
+
6 parámetros
+
contribuyen al resultado óptimo
    -
  • 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)
  • +
  • use_doc_unwarping (correlación +0.88): activarlo perjudica en PDFs digitales
  • +
  • use_doc_orient_classify (correlación -0.71): mejora la orientación en documentos complejos
  • +
  • textline_orientation (correlación -0.54): crítico para layouts mixtos
  • +
  • Umbrales numéricos aportan ajuste fino adicional (hasta -0.43 correlación)
+
+ Conclusión: Sin búsqueda sistemática de 64 trials, estas interacciones entre parámetros permanecerían desconocidas. La optimización conjunta es lo que logra CER < 1%. +
diff --git a/thesis_output/presentation/slides/16_optimal_config.html b/thesis_output/presentation/slides/16_optimal_config.html index 89ffcaa..c693b64 100644 --- a/thesis_output/presentation/slides/16_optimal_config.html +++ b/thesis_output/presentation/slides/16_optimal_config.html @@ -17,7 +17,7 @@

Insights clave

    -
  • textline_orientation = True: Parámetro más impactante (-63.2% CER)
  • +
  • Optimización conjunta: la búsqueda sistemática identificó interacciones críticas entre 6 parámetros
  • 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