Create Readme
Browse files
README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- paddleocr
|
| 5 |
+
- ocr
|
| 6 |
+
- vision-language-model
|
| 7 |
+
- ernie-kit
|
| 8 |
+
- historical-document-processing
|
| 9 |
+
- handwriting-recognition
|
| 10 |
+
- gothic-script
|
| 11 |
+
- paleography
|
| 12 |
+
base_model: PaddlePaddle/PaddleOCR-VL-0.9B
|
| 13 |
+
language:
|
| 14 |
+
- es
|
| 15 |
+
pipeline_tag: image-to-text
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# π Chronos-VL: The 1545 Resurrection Engine
|
| 19 |
+
|
| 20 |
+
> **π Baidu ERNIE AI Developer Challenge Submission**
|
| 21 |
+
|
| 22 |
+
**Chronos-VL** is a specialized fine-tune of **PaddleOCR-VL-0.9B**, engineered to decipher Early Modern Spanish Gothic script (c. 1545). Trained on the **RODRIGO Corpus** using Baidu's **ERNIEKit** on an NVIDIA A100 GPU, this model bridges the 500-year gap between ancient archives and modern AI.
|
| 23 |
+
|
| 24 |
+
While standard OCR models fail on these historical manuscripts due to complex calligraphy, ligatures, and ink degradation, Chronos-VL achieves near-perfect transcription for clear text lines.
|
| 25 |
+
|
| 26 |
+
## π Performance Benchmark
|
| 27 |
+
|
| 28 |
+
We conducted a side-by-side evaluation on 100 unseen historical samples using a custom A/B testing framework.
|
| 29 |
+
|
| 30 |
+
| Metric | Baseline (Standard PaddleOCR) | Chronos-VL (Ours) | Improvement |
|
| 31 |
+
| :--- | :--- | :--- | :--- |
|
| 32 |
+
| **Median Character Error Rate (CER)** | 19.82% | **1.64%** | **12x Better** |
|
| 33 |
+
| **Excellent Predictions (<5% Error)** | 1% | **77%** | **76x Increase** |
|
| 34 |
+
| **Word Error Rate (WER)** | 74.44% | **17.35%** | **4x Better** |
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
## π Interactive Demo (Colab)
|
| 38 |
+
|
| 39 |
+
Don't just take our word for it. Run the **Chronos System** yourself.
|
| 40 |
+
Our interactive Gradio app allows you to:
|
| 41 |
+
1. **Compare** Baseline vs. Chronos-VL side-by-side.
|
| 42 |
+
2. **Visualize** the "X-Ray" overlay (Visual Restoration).
|
| 43 |
+
3. **Translate** the archaic text to Modern Spanish and English.
|
| 44 |
+
|
| 45 |
+
[](LINK_TO_YOUR_GRADIO_COLAB_HERE)
|
| 46 |
+
|
| 47 |
+
## π» Usage (Python)
|
| 48 |
+
|
| 49 |
+
To use this model in your own code, you need `paddleocr` and `huggingface_hub`.
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
from huggingface_hub import snapshot_download
|
| 53 |
+
from paddleocr import PaddleOCR
|
| 54 |
+
|
| 55 |
+
# 1. Download the Fine-Tuned Weights
|
| 56 |
+
local_dir = snapshot_download(repo_id="Deepesh-001/rodrigo-ocr-model")
|
| 57 |
+
|
| 58 |
+
# 2. Initialize the Engine
|
| 59 |
+
# We use use_angle_cls=True to handle rotated manuscript lines
|
| 60 |
+
ocr = PaddleOCR(
|
| 61 |
+
rec_model_dir=local_dir,
|
| 62 |
+
use_angle_cls=True,
|
| 63 |
+
use_gpu=True
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
# 3. Run Inference on a 1545 Manuscript
|
| 67 |
+
image_path = "rodrigo_sample.png"
|
| 68 |
+
result = ocr.ocr(image_path, cls=True)
|
| 69 |
+
|
| 70 |
+
for line in result[0]:
|
| 71 |
+
text = line[1][0]
|
| 72 |
+
confidence = line[1][1]
|
| 73 |
+
print(f"Detected: {text} | Confidence: {confidence:.2f}")
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## π§ The Chronos Pipeline (System Design)
|
| 77 |
+
|
| 78 |
+
This model is the core perception layer of the broader **Chronos System**:
|
| 79 |
+
|
| 80 |
+
1. **Visual Perception (AI):** Chronos-VL extracts raw Gothic text (e.g., *"dixo estonces"*).
|
| 81 |
+
2. **Semantic Normalization (Logic):** A post-processing engine normalizes Archaic Castilian spelling to Modern Spanish (e.g., *"dijo entonces"*).
|
| 82 |
+
3. **Global Access (Translation):** Automated translation to English, making Spanish heritage accessible to non-Spanish speakers.
|
| 83 |
+
|
| 84 |
+
## π Dataset Info
|
| 85 |
+
Trained on the **RODRIGO Corpus** (Spanish State Archives).
|
| 86 |
+
- **Era:** 1545
|
| 87 |
+
- **Script:** Gothic Cursive
|
| 88 |
+
- **Size:** 9,000 text lines (80/20 Split)
|
| 89 |
+
- **Format:** Page-XML converted to ERNIEKit JSONL
|
| 90 |
+
|
| 91 |
+
## π Links
|
| 92 |
+
- **Code Repository:** [LINK TO YOUR GITHUB REPO]
|
| 93 |
+
- **Project Video:** [LINK TO YOUR YOUTUBE VIDEO]
|
| 94 |
+
|
| 95 |
+
*Built with β€οΈ using PaddlePaddle and ERNIEKit.*
|