davanstrien HF Staff commited on
Commit
44af14e
ยท
verified ยท
1 Parent(s): afa50c5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +97 -35
README.md CHANGED
@@ -1,37 +1,99 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: raw_queries
7
- list: string
8
- - name: broad_topical_query
9
- dtype: string
10
- - name: broad_topical_explanation
11
- dtype: string
12
- - name: specific_detail_query
13
- dtype: string
14
- - name: specific_detail_explanation
15
- dtype: string
16
- - name: visual_element_query
17
- dtype: string
18
- - name: visual_element_explanation
19
- dtype: string
20
- - name: parsed_into_json
21
- dtype: bool
22
- - name: markdown
23
- dtype: string
24
- - name: inference_info
25
- dtype: string
26
- splits:
27
- - name: train
28
- num_bytes: 1248048
29
- num_examples: 10
30
- download_size: 1217785
31
- dataset_size: 1248048
32
- configs:
33
- - config_name: default
34
- data_files:
35
- - split: train
36
- path: data/train-*
37
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - ocr
4
+ - document-processing
5
+ - deepseek
6
+ - deepseek-ocr
7
+ - markdown
8
+ - uv-script
9
+ - generated
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
+
12
+ # Document OCR using DeepSeek-OCR
13
+
14
+ This dataset contains markdown-formatted OCR results from images in [davanstrien/ufo-ColPali](https://huggingface.co/datasets/davanstrien/ufo-ColPali) using DeepSeek-OCR.
15
+
16
+ ## Processing Details
17
+
18
+ - **Source Dataset**: [davanstrien/ufo-ColPali](https://huggingface.co/datasets/davanstrien/ufo-ColPali)
19
+ - **Model**: [deepseek-ai/DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR)
20
+ - **Number of Samples**: 10
21
+ - **Processing Time**: 1.6 min
22
+ - **Processing Date**: 2025-10-22 16:47 UTC
23
+
24
+ ### Configuration
25
+
26
+ - **Image Column**: `image`
27
+ - **Output Column**: `markdown`
28
+ - **Dataset Split**: `train`
29
+ - **Batch Size**: 8
30
+ - **Resolution Mode**: tiny
31
+ - **Base Size**: 512
32
+ - **Image Size**: 512
33
+ - **Crop Mode**: False
34
+ - **Max Model Length**: 8,192 tokens
35
+ - **Max Output Tokens**: 8,192
36
+ - **GPU Memory Utilization**: 80.0%
37
+
38
+ ## Model Information
39
+
40
+ DeepSeek-OCR is a state-of-the-art document OCR model that excels at:
41
+ - ๐Ÿ“ **LaTeX equations** - Mathematical formulas preserved in LaTeX format
42
+ - ๐Ÿ“Š **Tables** - Extracted and formatted as HTML/markdown
43
+ - ๐Ÿ“ **Document structure** - Headers, lists, and formatting maintained
44
+ - ๐Ÿ–ผ๏ธ **Image grounding** - Spatial layout and bounding box information
45
+ - ๐Ÿ” **Complex layouts** - Multi-column and hierarchical structures
46
+ - ๐ŸŒ **Multilingual** - Supports multiple languages
47
+
48
+ ### Resolution Modes
49
+
50
+ - **Tiny** (512ร—512): Fast processing, 64 vision tokens
51
+ - **Small** (640ร—640): Balanced speed/quality, 100 vision tokens
52
+ - **Base** (1024ร—1024): High quality, 256 vision tokens
53
+ - **Large** (1280ร—1280): Maximum quality, 400 vision tokens
54
+ - **Gundam** (dynamic): Adaptive multi-tile processing for large documents
55
+
56
+ ## Dataset Structure
57
+
58
+ The dataset contains all original columns plus:
59
+ - `markdown`: The extracted text in markdown format with preserved structure
60
+ - `inference_info`: JSON list tracking all OCR models applied to this dataset
61
+
62
+ ## Usage
63
+
64
+ ```python
65
+ from datasets import load_dataset
66
+ import json
67
+
68
+ # Load the dataset
69
+ dataset = load_dataset("{{output_dataset_id}}", split="train")
70
+
71
+ # Access the markdown text
72
+ for example in dataset:
73
+ print(example["markdown"])
74
+ break
75
+
76
+ # View all OCR models applied to this dataset
77
+ inference_info = json.loads(dataset[0]["inference_info"])
78
+ for info in inference_info:
79
+ print(f"Column: {{info['column_name']}} - Model: {{info['model_id']}}")
80
+ ```
81
+
82
+ ## Reproduction
83
+
84
+ This dataset was generated using the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) DeepSeek OCR vLLM script:
85
+
86
+ ```bash
87
+ uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/deepseek-ocr-vllm.py \\
88
+ davanstrien/ufo-ColPali \\
89
+ <output-dataset> \\
90
+ --resolution-mode tiny \\
91
+ --image-column image
92
+ ```
93
+
94
+ ## Performance
95
+
96
+ - **Processing Speed**: ~0.1 images/second
97
+ - **Processing Method**: Batch processing with vLLM (2-3x speedup over sequential)
98
+
99
+ Generated with ๐Ÿค– [UV Scripts](https://huggingface.co/uv-scripts)