davanstrien HF Staff commited on
Commit
e52c180
Β·
verified Β·
1 Parent(s): b3d2c7d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +84 -41
README.md CHANGED
@@ -1,43 +1,86 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: filename
7
- dtype: string
8
- - name: subtype_label
9
- dtype: string
10
- - name: modifier
11
- dtype: bool
12
- - name: transcription
13
- dtype: string
14
- - name: metadata_json
15
- dtype: string
16
- - name: series_title
17
- dtype: string
18
- - name: episode_no
19
- dtype: string
20
- - name: program_title
21
- dtype: string
22
- - name: episode_title
23
- dtype: string
24
- - name: director
25
- dtype: string
26
- - name: producer
27
- dtype: string
28
- - name: markdown
29
- dtype: string
30
- - name: inference_info
31
- dtype: string
32
- splits:
33
- - name: train
34
- num_bytes: 1881689
35
- num_examples: 100
36
- download_size: 1832185
37
- dataset_size: 1881689
38
- configs:
39
- - config_name: default
40
- data_files:
41
- - split: train
42
- path: data/train-*
43
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - ocr
4
+ - document-processing
5
+ - dots-ocr
6
+ - multilingual
7
+ - markdown
8
+ - uv-script
9
+ - generated
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
+
12
+ # Document OCR using dots.ocr
13
+
14
+ This dataset contains OCR results from images in [davanstrien/transcribed-slates](https://huggingface.co/datasets/davanstrien/transcribed-slates) using DoTS.ocr, a compact 1.7B multilingual model.
15
+
16
+ ## Processing Details
17
+
18
+ - **Source Dataset**: [davanstrien/transcribed-slates](https://huggingface.co/datasets/davanstrien/transcribed-slates)
19
+ - **Model**: [rednote-hilab/dots.ocr](https://huggingface.co/rednote-hilab/dots.ocr)
20
+ - **Number of Samples**: 100
21
+ - **Processing Time**: 1.5 min
22
+ - **Processing Date**: 2025-10-22 15:19 UTC
23
+
24
+ ### Configuration
25
+
26
+ - **Image Column**: `image`
27
+ - **Output Column**: `markdown`
28
+ - **Dataset Split**: `train`
29
+ - **Batch Size**: 256
30
+ - **Prompt Mode**: ocr
31
+ - **Max Model Length**: 8,192 tokens
32
+ - **Max Output Tokens**: 8,192
33
+ - **GPU Memory Utilization**: 80.0%
34
+
35
+ ## Model Information
36
+
37
+ DoTS.ocr is a compact multilingual document parsing model that excels at:
38
+ - 🌍 **100+ Languages** - Multilingual document support
39
+ - πŸ“Š **Table extraction** - Structured data recognition
40
+ - πŸ“ **Formulas** - Mathematical notation preservation
41
+ - πŸ“ **Layout-aware** - Reading order and structure preservation
42
+ - 🎯 **Compact** - Only 1.7B parameters
43
+
44
+ ## Dataset Structure
45
+
46
+ The dataset contains all original columns plus:
47
+ - `markdown`: The extracted text in markdown format
48
+ - `inference_info`: JSON list tracking all OCR models applied to this dataset
49
+
50
+ ## Usage
51
+
52
+ ```python
53
+ from datasets import load_dataset
54
+ import json
55
+
56
+ # Load the dataset
57
+ dataset = load_dataset("{output_dataset_id}", split="train")
58
+
59
+ # Access the markdown text
60
+ for example in dataset:
61
+ print(example["markdown"])
62
+ break
63
+
64
+ # View all OCR models applied to this dataset
65
+ inference_info = json.loads(dataset[0]["inference_info"])
66
+ for info in inference_info:
67
+ print(f"Column: {info['column_name']} - Model: {info['model_id']}")
68
+ ```
69
+
70
+ ## Reproduction
71
+
72
+ This dataset was generated using the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) DoTS OCR script:
73
+
74
+ ```bash
75
+ uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-ocr.py \
76
+ davanstrien/transcribed-slates \
77
+ <output-dataset> \
78
+ --image-column image \
79
+ --batch-size 256 \
80
+ --prompt-mode ocr \
81
+ --max-model-len 8192 \
82
+ --max-tokens 8192 \
83
+ --gpu-memory-utilization 0.8
84
+ ```
85
+
86
+ Generated with πŸ€– [UV Scripts](https://huggingface.co/uv-scripts)