andesco commited on
Commit
45066cc
·
verified ·
1 Parent(s): 4ce00f1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +84 -19
README.md CHANGED
@@ -1,21 +1,86 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: markdown
7
- dtype: string
8
- - name: inference_info
9
- dtype: string
10
- splits:
11
- - name: train
12
- num_bytes: 246953015
13
- num_examples: 340
14
- download_size: 246373788
15
- dataset_size: 246953015
16
- configs:
17
- - config_name: default
18
- data_files:
19
- - split: train
20
- path: data/train-*
21
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 [andesco/risk-management-3rd-images](https://huggingface.co/datasets/andesco/risk-management-3rd-images) using DeepSeek-OCR.
15
+
16
+ ## Processing Details
17
+
18
+ - **Source Dataset**: [andesco/risk-management-3rd-images](https://huggingface.co/datasets/andesco/risk-management-3rd-images)
19
+ - **Model**: [deepseek-ai/DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR)
20
+ - **Number of Samples**: 340
21
+ - **Processing Time**: 10.4 min
22
+ - **Processing Date**: 2026-02-21 22:06 UTC
23
+
24
+ ### Configuration
25
+
26
+ - **Image Column**: `image`
27
+ - **Output Column**: `markdown`
28
+ - **Dataset Split**: `train`
29
+ - **Batch Size**: 8
30
+ - **Max Model Length**: 8,192 tokens
31
+ - **Max Output Tokens**: 8,192
32
+ - **GPU Memory Utilization**: 80.0%
33
+
34
+ ## Model Information
35
+
36
+ DeepSeek-OCR is a state-of-the-art document OCR model that excels at:
37
+ - LaTeX equations - Mathematical formulas preserved in LaTeX format
38
+ - Tables - Extracted and formatted as HTML/markdown
39
+ - Document structure - Headers, lists, and formatting maintained
40
+ - Image grounding - Spatial layout and bounding box information
41
+ - Complex layouts - Multi-column and hierarchical structures
42
+ - Multilingual - Supports multiple languages
43
+
44
+ ## Dataset Structure
45
+
46
+ The dataset contains all original columns plus:
47
+ - `markdown`: The extracted text in markdown format with preserved structure
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) DeepSeek OCR vLLM script:
73
+
74
+ ```bash
75
+ uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/deepseek-ocr-vllm.py \\
76
+ andesco/risk-management-3rd-images \\
77
+ <output-dataset> \\
78
+ --image-column image
79
+ ```
80
+
81
+ ## Performance
82
+
83
+ - **Processing Speed**: ~0.5 images/second
84
+ - **Processing Method**: Batch processing with vLLM (2-3x speedup over sequential)
85
+
86
+ Generated with [UV Scripts](https://huggingface.co/uv-scripts)