Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -2,123 +2,62 @@
|
|
| 2 |
tags:
|
| 3 |
- ocr
|
| 4 |
- document-processing
|
| 5 |
-
-
|
| 6 |
-
-
|
| 7 |
- uv-script
|
| 8 |
- generated
|
| 9 |
-
configs:
|
| 10 |
-
- config_name: default
|
| 11 |
-
data_files:
|
| 12 |
-
- split: train
|
| 13 |
-
path: data/train-*
|
| 14 |
-
dataset_info:
|
| 15 |
-
features:
|
| 16 |
-
- name: image
|
| 17 |
-
dtype: image
|
| 18 |
-
- name: filename
|
| 19 |
-
dtype: string
|
| 20 |
-
- name: markdown
|
| 21 |
-
dtype: string
|
| 22 |
-
- name: inference_info
|
| 23 |
-
dtype: string
|
| 24 |
-
splits:
|
| 25 |
-
- name: train
|
| 26 |
-
num_bytes: 17116070.0
|
| 27 |
-
num_examples: 13
|
| 28 |
-
download_size: 15229790
|
| 29 |
-
dataset_size: 17116070.0
|
| 30 |
---
|
| 31 |
|
| 32 |
-
# Document
|
| 33 |
|
| 34 |
-
This dataset contains OCR results from images in [minhpvo/ocr-input](https://huggingface.co/datasets/minhpvo/ocr-input) using
|
| 35 |
|
| 36 |
## Processing Details
|
| 37 |
|
| 38 |
- **Source Dataset**: [minhpvo/ocr-input](https://huggingface.co/datasets/minhpvo/ocr-input)
|
| 39 |
-
- **Model**: [
|
| 40 |
-
- **Task
|
| 41 |
- **Number of Samples**: 13
|
| 42 |
-
- **Processing Time**:
|
| 43 |
-
- **Processing Date**: 2026-02-06 17:
|
| 44 |
|
| 45 |
### Configuration
|
| 46 |
|
| 47 |
- **Image Column**: `image`
|
| 48 |
-
- **Output Column**: `
|
| 49 |
- **Dataset Split**: `train`
|
| 50 |
- **Batch Size**: 16
|
| 51 |
-
- **Smart Resize**: Enabled
|
| 52 |
- **Max Model Length**: 8,192 tokens
|
| 53 |
-
- **Max Output Tokens**:
|
| 54 |
-
- **Temperature**: 0.
|
|
|
|
| 55 |
- **GPU Memory Utilization**: 80.0%
|
| 56 |
|
| 57 |
## Model Information
|
| 58 |
|
| 59 |
-
|
| 60 |
-
-
|
| 61 |
-
-
|
| 62 |
-
-
|
| 63 |
-
-
|
| 64 |
-
-
|
| 65 |
-
-
|
| 66 |
-
- ⚡ **Fast** - Quick initialization and inference
|
| 67 |
-
- 🔧 **ERNIE-4.5 based** - Different architecture from Qwen models
|
| 68 |
-
|
| 69 |
-
### Task Modes
|
| 70 |
-
|
| 71 |
-
- **OCR**: Extract text content to markdown format
|
| 72 |
-
- **Table Recognition**: Extract tables to HTML format
|
| 73 |
-
- **Formula Recognition**: Extract mathematical formulas to LaTeX
|
| 74 |
-
- **Chart Recognition**: Analyze and describe charts/diagrams
|
| 75 |
|
| 76 |
## Dataset Structure
|
| 77 |
|
| 78 |
The dataset contains all original columns plus:
|
| 79 |
-
- `
|
| 80 |
- `inference_info`: JSON list tracking all OCR models applied to this dataset
|
| 81 |
|
| 82 |
-
## Usage
|
| 83 |
-
|
| 84 |
-
```python
|
| 85 |
-
from datasets import load_dataset
|
| 86 |
-
import json
|
| 87 |
-
|
| 88 |
-
# Load the dataset
|
| 89 |
-
dataset = load_dataset("{output_dataset_id}", split="train")
|
| 90 |
-
|
| 91 |
-
# Access the extracted content
|
| 92 |
-
for example in dataset:
|
| 93 |
-
print(example["paddleocr_ocr"])
|
| 94 |
-
break
|
| 95 |
-
|
| 96 |
-
# View all OCR models applied to this dataset
|
| 97 |
-
inference_info = json.loads(dataset[0]["inference_info"])
|
| 98 |
-
for info in inference_info:
|
| 99 |
-
print(f"Task: {info['task_mode']} - Model: {info['model_id']}")
|
| 100 |
-
```
|
| 101 |
-
|
| 102 |
## Reproduction
|
| 103 |
|
| 104 |
-
This dataset was generated using the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) PaddleOCR-VL script:
|
| 105 |
-
|
| 106 |
```bash
|
| 107 |
-
uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/
|
| 108 |
minhpvo/ocr-input \
|
| 109 |
<output-dataset> \
|
| 110 |
-
--task-mode ocr \
|
| 111 |
--image-column image \
|
| 112 |
--batch-size 16 \
|
| 113 |
-
--
|
| 114 |
-
--max-tokens 4096 \
|
| 115 |
-
--gpu-memory-utilization 0.8
|
| 116 |
```
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
- **Model Size**: 0.9B parameters (smallest among OCR models)
|
| 121 |
-
- **Processing Speed**: ~0.11 images/second
|
| 122 |
-
- **Architecture**: NaViT visual encoder + ERNIE-4.5-0.3B language model
|
| 123 |
-
|
| 124 |
-
Generated with 🤖 [UV Scripts](https://huggingface.co/uv-scripts)
|
|
|
|
| 2 |
tags:
|
| 3 |
- ocr
|
| 4 |
- document-processing
|
| 5 |
+
- glm-ocr
|
| 6 |
+
- markdown
|
| 7 |
- uv-script
|
| 8 |
- generated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Document OCR using GLM-OCR
|
| 12 |
|
| 13 |
+
This dataset contains OCR results from images in [minhpvo/ocr-input](https://huggingface.co/datasets/minhpvo/ocr-input) using GLM-OCR, a compact 0.9B OCR model achieving SOTA performance.
|
| 14 |
|
| 15 |
## Processing Details
|
| 16 |
|
| 17 |
- **Source Dataset**: [minhpvo/ocr-input](https://huggingface.co/datasets/minhpvo/ocr-input)
|
| 18 |
+
- **Model**: [zai-org/GLM-OCR](https://huggingface.co/zai-org/GLM-OCR)
|
| 19 |
+
- **Task**: text recognition
|
| 20 |
- **Number of Samples**: 13
|
| 21 |
+
- **Processing Time**: 2.3 min
|
| 22 |
+
- **Processing Date**: 2026-02-06 17:48 UTC
|
| 23 |
|
| 24 |
### Configuration
|
| 25 |
|
| 26 |
- **Image Column**: `image`
|
| 27 |
+
- **Output Column**: `markdown`
|
| 28 |
- **Dataset Split**: `train`
|
| 29 |
- **Batch Size**: 16
|
|
|
|
| 30 |
- **Max Model Length**: 8,192 tokens
|
| 31 |
+
- **Max Output Tokens**: 16,384
|
| 32 |
+
- **Temperature**: 0.01
|
| 33 |
+
- **Top P**: 1e-05
|
| 34 |
- **GPU Memory Utilization**: 80.0%
|
| 35 |
|
| 36 |
## Model Information
|
| 37 |
|
| 38 |
+
GLM-OCR is a compact, high-performance OCR model:
|
| 39 |
+
- 0.9B parameters
|
| 40 |
+
- 94.62% on OmniDocBench V1.5
|
| 41 |
+
- CogViT visual encoder + GLM-0.5B language decoder
|
| 42 |
+
- Multi-Token Prediction (MTP) loss for efficiency
|
| 43 |
+
- Multilingual: zh, en, fr, es, ru, de, ja, ko
|
| 44 |
+
- MIT licensed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
## Dataset Structure
|
| 47 |
|
| 48 |
The dataset contains all original columns plus:
|
| 49 |
+
- `markdown`: The extracted text in markdown format
|
| 50 |
- `inference_info`: JSON list tracking all OCR models applied to this dataset
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
## Reproduction
|
| 53 |
|
|
|
|
|
|
|
| 54 |
```bash
|
| 55 |
+
uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/glm-ocr.py \
|
| 56 |
minhpvo/ocr-input \
|
| 57 |
<output-dataset> \
|
|
|
|
| 58 |
--image-column image \
|
| 59 |
--batch-size 16 \
|
| 60 |
+
--task ocr
|
|
|
|
|
|
|
| 61 |
```
|
| 62 |
|
| 63 |
+
Generated with [UV Scripts](https://huggingface.co/uv-scripts)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|