Update generation

This commit is contained in:
2025-12-16 00:31:27 +01:00
parent 3b0f30d79b
commit 6608032f0c
13 changed files with 31 additions and 17 deletions

View File

@@ -110,8 +110,8 @@ def parse_md_to_html_blocks(md_content):
html_blocks.append(f'''<p class=MsoCaption style="text-align:center"><a name="{bookmark_id}"><b><span lang=ES style="font-size:12.0pt;line-height:150%">Figura </span></b></a><!--[if supportFields]><span style='mso-element:field-begin'></span> SEQ Figura \\* ARABIC <span style='mso-element:field-separator'></span><![endif]--><b><span lang=ES style="font-size:12.0pt;line-height:150%">{figure_counter}</span></b><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><b><span lang=ES style="font-size:12.0pt;line-height:150%">.</span></b><span lang=ES style="font-size:12.0pt;line-height:150%"> </span><i><span lang=ES style="font-size:12.0pt;line-height:150%;font-weight:normal">{fig_title}</span></i></p>''') html_blocks.append(f'''<p class=MsoCaption style="text-align:center"><a name="{bookmark_id}"><b><span lang=ES style="font-size:12.0pt;line-height:150%">Figura </span></b></a><!--[if supportFields]><span style='mso-element:field-begin'></span> SEQ Figura \\* ARABIC <span style='mso-element:field-separator'></span><![endif]--><b><span lang=ES style="font-size:12.0pt;line-height:150%">{figure_counter}</span></b><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><b><span lang=ES style="font-size:12.0pt;line-height:150%">.</span></b><span lang=ES style="font-size:12.0pt;line-height:150%"> </span><i><span lang=ES style="font-size:12.0pt;line-height:150%;font-weight:normal">{fig_title}</span></i></p>''')
if os.path.exists(fig_path): if os.path.exists(fig_path):
# Use actual image with proper Word-compatible format (max 400px width, 500px height to fit page) # Use actual image with proper Word-compatible format (max 350px width, 400px height to fit page with caption)
html_blocks.append(f'''<p class=MsoNormal style="text-align:center"><span lang=ES><img style="max-width:400px;max-height:500px;width:auto;height:auto" src="{fig_file}" alt="{fig_title}"/></span></p>''') html_blocks.append(f'''<p class=MsoNormal style="text-align:center"><span lang=ES><img style="max-width:350px;max-height:400px;width:auto;height:auto" src="{fig_file}" alt="{fig_title}"/></span></p>''')
else: else:
# Fallback to placeholder # Fallback to placeholder
html_blocks.append(f'''<p class=MsoNormal style="text-align:center;border:1px dashed #999;padding:20px;margin:10px 40px;background:#f9f9f9"><span lang=ES style="color:#666">[Insertar diagrama Mermaid aquí]</span></p>''') html_blocks.append(f'''<p class=MsoNormal style="text-align:center;border:1px dashed #999;padding:20px;margin:10px 40px;background:#f9f9f9"><span lang=ES style="color:#666">[Insertar diagrama Mermaid aquí]</span></p>''')

View File

@@ -18,6 +18,9 @@ El Reconocimiento Óptico de Caracteres (OCR) es el proceso de conversión de im
Los sistemas OCR modernos siguen típicamente un pipeline de dos etapas: Los sistemas OCR modernos siguen típicamente un pipeline de dos etapas:
```mermaid ```mermaid
---
title: "Pipeline de un sistema OCR moderno"
---
flowchart LR flowchart LR
subgraph Input subgraph Input
A["Imagen de<br/>documento"] A["Imagen de<br/>documento"]
@@ -43,8 +46,6 @@ flowchart LR
style D fill:#c8e6c9 style D fill:#c8e6c9
``` ```
*Figura 1. Pipeline típico de un sistema OCR moderno con etapas de detección y reconocimiento.*
1. **Detección de texto (Text Detection)**: Localización de regiones que contienen texto en la imagen. Las arquitecturas más utilizadas incluyen: 1. **Detección de texto (Text Detection)**: Localización de regiones que contienen texto en la imagen. Las arquitecturas más utilizadas incluyen:
- EAST (Efficient and Accurate Scene Text Detector) - EAST (Efficient and Accurate Scene Text Detector)
- CRAFT (Character Region Awareness for Text Detection) - CRAFT (Character Region Awareness for Text Detection)
@@ -165,6 +166,9 @@ Los métodos de HPO incluyen:
La combinación Ray Tune + Optuna permite búsquedas eficientes en espacios de alta dimensionalidad. La combinación Ray Tune + Optuna permite búsquedas eficientes en espacios de alta dimensionalidad.
```mermaid ```mermaid
---
title: "Ciclo de optimización con Ray Tune y Optuna"
---
flowchart LR flowchart LR
A["Espacio de<br/>búsqueda"] --> B["Ray Tune<br/>Scheduler"] A["Espacio de<br/>búsqueda"] --> B["Ray Tune<br/>Scheduler"]
B --> C["Trials<br/>paralelos"] B --> C["Trials<br/>paralelos"]
@@ -174,8 +178,6 @@ flowchart LR
F -->|"Nueva config"| B F -->|"Nueva config"| B
``` ```
*Figura 2. Ciclo de optimización de hiperparámetros con Ray Tune y Optuna.*
#### HPO en Sistemas OCR #### HPO en Sistemas OCR
La aplicación de HPO a sistemas OCR ha sido explorada principalmente en el contexto de: La aplicación de HPO a sistemas OCR ha sido explorada principalmente en el contexto de:

View File

@@ -40,6 +40,9 @@ Este capítulo establece los objetivos del trabajo siguiendo la metodología SMA
```mermaid ```mermaid
---
title: "Fases de la metodología experimental"
---
flowchart LR flowchart LR
A["Fase 1<br/>Dataset"] --> B["Fase 2<br/>Benchmark"] --> C["Fase 3<br/>Espacio"] --> D["Fase 4<br/>Optimización"] --> E["Fase 5<br/>Validación"] A["Fase 1<br/>Dataset"] --> B["Fase 2<br/>Benchmark"] --> C["Fase 3<br/>Espacio"] --> D["Fase 4<br/>Optimización"] --> E["Fase 5<br/>Validación"]
``` ```
@@ -74,6 +77,9 @@ El script `prepare_dataset.ipynb` implementa:
#### Estructura del Dataset #### Estructura del Dataset
```mermaid ```mermaid
---
title: "Estructura del dataset de evaluación"
---
flowchart LR flowchart LR
dataset["dataset/"] --> d0["0/"] dataset["dataset/"] --> d0["0/"]
@@ -178,6 +184,9 @@ tuner = tune.Tuner(
Debido a incompatibilidades entre Ray y PaddleOCR en el mismo proceso, se implementó una arquitectura basada en subprocesos: Debido a incompatibilidades entre Ray y PaddleOCR en el mismo proceso, se implementó una arquitectura basada en subprocesos:
```mermaid ```mermaid
---
title: "Arquitectura de ejecución con subprocesos"
---
flowchart LR flowchart LR
A["Ray Tune (proceso principal)"] A["Ray Tune (proceso principal)"]

View File

@@ -16,6 +16,9 @@ El repositorio incluye:
## A.2 Estructura del Repositorio ## A.2 Estructura del Repositorio
```mermaid ```mermaid
---
title: "Estructura del repositorio del proyecto"
---
flowchart LR flowchart LR
root["MastersThesis/"] --> docs["docs/"] root["MastersThesis/"] --> docs["docs/"]
root --> src["src/"] root --> src["src/"]
@@ -30,8 +33,6 @@ flowchart LR
src --> csv["raytune_results_*.csv"] src --> csv["raytune_results_*.csv"]
``` ```
*Figura 8. Estructura del repositorio del proyecto.*
**Descripción de componentes:** **Descripción de componentes:**
- **docs/**: Capítulos de la tesis en Markdown - **docs/**: Capítulos de la tesis en Markdown

View File

@@ -35,9 +35,11 @@ def extract_mermaid_diagrams():
matches = re.findall(pattern, content, re.DOTALL) matches = re.findall(pattern, content, re.DOTALL)
for i, mermaid_code in enumerate(matches): for i, mermaid_code in enumerate(matches):
# Try to extract title # Try to extract title from YAML front matter or inline title
title_match = re.search(r'title:\s*["\']([^"\']+)["\']', mermaid_code)
if not title_match:
title_match = re.search(r'title\s+["\']?([^"\'"\n]+)["\']?', mermaid_code) title_match = re.search(r'title\s+["\']?([^"\'"\n]+)["\']?', mermaid_code)
title = title_match.group(1).strip() if title_match else f"Diagrama de {md_file}" title = title_match.group(1).strip() if title_match else f"Diagrama {len(diagrams) + 1}"
diagrams.append({ diagrams.append({
'source': md_file, 'source': md_file,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

@@ -1,27 +1,27 @@
[ [
{ {
"file": "figura_1.png", "file": "figura_1.png",
"title": "Diagrama de 02_contexto_estado_arte.md", "title": "Pipeline de un sistema OCR moderno",
"index": 1 "index": 1
}, },
{ {
"file": "figura_2.png", "file": "figura_2.png",
"title": "Diagrama de 02_contexto_estado_arte.md", "title": "Ciclo de optimización con Ray Tune y Optuna",
"index": 2 "index": 2
}, },
{ {
"file": "figura_3.png", "file": "figura_3.png",
"title": "Diagrama de 03_objetivos_metodologia.md", "title": "Fases de la metodología experimental",
"index": 3 "index": 3
}, },
{ {
"file": "figura_4.png", "file": "figura_4.png",
"title": "Diagrama de 03_objetivos_metodologia.md", "title": "Estructura del dataset de evaluación",
"index": 4 "index": 4
}, },
{ {
"file": "figura_5.png", "file": "figura_5.png",
"title": "Diagrama de 03_objetivos_metodologia.md", "title": "Arquitectura de ejecución con subprocesos",
"index": 5 "index": 5
}, },
{ {
@@ -36,7 +36,7 @@
}, },
{ {
"file": "figura_8.png", "file": "figura_8.png",
"title": "Diagrama de 07_anexo_a.md", "title": "Estructura del repositorio del proyecto",
"index": 8 "index": 8
} }
] ]