diff --git a/apply_content.py b/apply_content.py
index 8389a4b..84bb22d 100644
--- a/apply_content.py
+++ b/apply_content.py
@@ -110,8 +110,8 @@ def parse_md_to_html_blocks(md_content):
html_blocks.append(f'''
Figura {figure_counter}. {fig_title}
''')
if os.path.exists(fig_path):
- # Use actual image with proper Word-compatible format (max 400px width, 500px height to fit page)
- html_blocks.append(f'''
''')
+ # Use actual image with proper Word-compatible format (max 350px width, 400px height to fit page with caption)
+ html_blocks.append(f'''
''')
else:
# Fallback to placeholder
html_blocks.append(f'''[Insertar diagrama Mermaid aquí]
''')
diff --git a/docs/02_contexto_estado_arte.md b/docs/02_contexto_estado_arte.md
index 74aff2c..37e14c0 100644
--- a/docs/02_contexto_estado_arte.md
+++ b/docs/02_contexto_estado_arte.md
@@ -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:
```mermaid
+---
+title: "Pipeline de un sistema OCR moderno"
+---
flowchart LR
subgraph Input
A["Imagen de
documento"]
@@ -43,8 +46,6 @@ flowchart LR
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:
- EAST (Efficient and Accurate Scene Text Detector)
- 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.
```mermaid
+---
+title: "Ciclo de optimización con Ray Tune y Optuna"
+---
flowchart LR
A["Espacio de
búsqueda"] --> B["Ray Tune
Scheduler"]
B --> C["Trials
paralelos"]
@@ -174,8 +178,6 @@ flowchart LR
F -->|"Nueva config"| B
```
-*Figura 2. Ciclo de optimización de hiperparámetros con Ray Tune y Optuna.*
-
#### HPO en Sistemas OCR
La aplicación de HPO a sistemas OCR ha sido explorada principalmente en el contexto de:
diff --git a/docs/03_objetivos_metodologia.md b/docs/03_objetivos_metodologia.md
index ffbd918..4624210 100644
--- a/docs/03_objetivos_metodologia.md
+++ b/docs/03_objetivos_metodologia.md
@@ -40,6 +40,9 @@ Este capítulo establece los objetivos del trabajo siguiendo la metodología SMA
```mermaid
+---
+title: "Fases de la metodología experimental"
+---
flowchart LR
A["Fase 1
Dataset"] --> B["Fase 2
Benchmark"] --> C["Fase 3
Espacio"] --> D["Fase 4
Optimización"] --> E["Fase 5
Validación"]
```
@@ -74,6 +77,9 @@ El script `prepare_dataset.ipynb` implementa:
#### Estructura del Dataset
```mermaid
+---
+title: "Estructura del dataset de evaluación"
+---
flowchart LR
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:
```mermaid
+---
+title: "Arquitectura de ejecución con subprocesos"
+---
flowchart LR
A["Ray Tune (proceso principal)"]
diff --git a/docs/07_anexo_a.md b/docs/07_anexo_a.md
index 6bc9ea3..cb45c8f 100644
--- a/docs/07_anexo_a.md
+++ b/docs/07_anexo_a.md
@@ -16,6 +16,9 @@ El repositorio incluye:
## A.2 Estructura del Repositorio
```mermaid
+---
+title: "Estructura del repositorio del proyecto"
+---
flowchart LR
root["MastersThesis/"] --> docs["docs/"]
root --> src["src/"]
@@ -30,8 +33,6 @@ flowchart LR
src --> csv["raytune_results_*.csv"]
```
-*Figura 8. Estructura del repositorio del proyecto.*
-
**Descripción de componentes:**
- **docs/**: Capítulos de la tesis en Markdown
diff --git a/generate_mermaid_figures.py b/generate_mermaid_figures.py
index 67008b0..0434b84 100644
--- a/generate_mermaid_figures.py
+++ b/generate_mermaid_figures.py
@@ -35,9 +35,11 @@ def extract_mermaid_diagrams():
matches = re.findall(pattern, content, re.DOTALL)
for i, mermaid_code in enumerate(matches):
- # Try to extract title
- 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}"
+ # 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 = title_match.group(1).strip() if title_match else f"Diagrama {len(diagrams) + 1}"
diagrams.append({
'source': md_file,
diff --git a/thesis_output/figures/figura_1.png b/thesis_output/figures/figura_1.png
index e88db68..cc72b75 100644
Binary files a/thesis_output/figures/figura_1.png and b/thesis_output/figures/figura_1.png differ
diff --git a/thesis_output/figures/figura_2.png b/thesis_output/figures/figura_2.png
index c12033c..17fbc7f 100644
Binary files a/thesis_output/figures/figura_2.png and b/thesis_output/figures/figura_2.png differ
diff --git a/thesis_output/figures/figura_3.png b/thesis_output/figures/figura_3.png
index 4f062df..2ea7163 100644
Binary files a/thesis_output/figures/figura_3.png and b/thesis_output/figures/figura_3.png differ
diff --git a/thesis_output/figures/figura_4.png b/thesis_output/figures/figura_4.png
index ec968d5..6752ff0 100644
Binary files a/thesis_output/figures/figura_4.png and b/thesis_output/figures/figura_4.png differ
diff --git a/thesis_output/figures/figura_5.png b/thesis_output/figures/figura_5.png
index d099975..a94326a 100644
Binary files a/thesis_output/figures/figura_5.png and b/thesis_output/figures/figura_5.png differ
diff --git a/thesis_output/figures/figura_8.png b/thesis_output/figures/figura_8.png
index 79ef9d1..2f1997e 100644
Binary files a/thesis_output/figures/figura_8.png and b/thesis_output/figures/figura_8.png differ
diff --git a/thesis_output/figures/figures_manifest.json b/thesis_output/figures/figures_manifest.json
index 7ef7170..128f1b6 100644
--- a/thesis_output/figures/figures_manifest.json
+++ b/thesis_output/figures/figures_manifest.json
@@ -1,27 +1,27 @@
[
{
"file": "figura_1.png",
- "title": "Diagrama de 02_contexto_estado_arte.md",
+ "title": "Pipeline de un sistema OCR moderno",
"index": 1
},
{
"file": "figura_2.png",
- "title": "Diagrama de 02_contexto_estado_arte.md",
+ "title": "Ciclo de optimización con Ray Tune y Optuna",
"index": 2
},
{
"file": "figura_3.png",
- "title": "Diagrama de 03_objetivos_metodologia.md",
+ "title": "Fases de la metodología experimental",
"index": 3
},
{
"file": "figura_4.png",
- "title": "Diagrama de 03_objetivos_metodologia.md",
+ "title": "Estructura del dataset de evaluación",
"index": 4
},
{
"file": "figura_5.png",
- "title": "Diagrama de 03_objetivos_metodologia.md",
+ "title": "Arquitectura de ejecución con subprocesos",
"index": 5
},
{
@@ -36,7 +36,7 @@
},
{
"file": "figura_8.png",
- "title": "Diagrama de 07_anexo_a.md",
+ "title": "Estructura del repositorio del proyecto",
"index": 8
}
]
\ No newline at end of file
diff --git a/thesis_output/plantilla_individual.htm b/thesis_output/plantilla_individual.htm
index 0b2763b..4230ac7 100644
Binary files a/thesis_output/plantilla_individual.htm and b/thesis_output/plantilla_individual.htm differ