rita1706 commited on
Commit
714f0d2
·
verified ·
1 Parent(s): 78b0e28

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +76 -0
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # dotsocr_markdown_dataset
2
+
3
+ ## Dataset Description
4
+
5
+ This dataset contains training data for DotsOCR to convert document images directly to markdown format.
6
+
7
+ ## Training Objective
8
+
9
+ The model learns to:
10
+ - Convert document images to clean markdown format
11
+ - Preserve document structure and hierarchy
12
+ - Extract all text content accurately
13
+ - Use appropriate markdown formatting for different content types
14
+
15
+ ## Dataset Structure
16
+
17
+ - **Training samples**: 798
18
+ - **Validation samples**: 200
19
+ - **Total samples**: 998
20
+
21
+ ## Files
22
+
23
+ - `data/dotsocr_markdown_dataset_train.json`: Training data in conversation format
24
+ - `data/dotsocr_markdown_dataset_val.json`: Validation data in conversation format
25
+ - `images/`: Directory containing all referenced images
26
+
27
+ ## Data Format
28
+
29
+ Each sample follows this conversation format:
30
+
31
+ ```json
32
+ {
33
+ "conversations": [
34
+ {
35
+ "from": "user",
36
+ "value": "<|imgpad|>images/example.jpg<|/imgpad|>\nPlease convert this document image to markdown format..."
37
+ },
38
+ {
39
+ "from": "assistant",
40
+ "value": "# Document Title\n\n## Section Header\n\nContent text here..."
41
+ }
42
+ ]
43
+ }
44
+ ```
45
+
46
+ ## Training Prompt
47
+
48
+ The training uses this prompt to teach the model markdown conversion:
49
+
50
+ ```
51
+ Convert this document image to markdown format. Extract and structure the text content as follows:
52
+
53
+ - Headers and titles as plain text on separate lines
54
+ - Body text as plain text paragraphs
55
+ - Lists using * for bullet points
56
+ - Tables using HTML table format: <table><thead><tr><th>...</th></tr></thead><tbody><tr><td>...</td></tr></tbody></table>
57
+ - Preserve the original reading order and document structure
58
+ - Extract all visible text exactly as it appears
59
+
60
+ Output the content in markdown format with HTML tables for tabular data.
61
+ ```
62
+
63
+ ## Usage
64
+
65
+ This dataset is designed to train DotsOCR models for direct image-to-markdown conversion tasks. The model learns to:
66
+
67
+ 1. Analyze document images
68
+ 2. Extract text content in reading order
69
+ 3. Apply appropriate markdown formatting
70
+ 4. Output clean, structured markdown
71
+
72
+ ## Citation
73
+
74
+ Based on the DotsOCR model by rednote-hilab: https://github.com/rednote-hilab/dots.ocr
75
+
76
+ Generated on: 2025-09-26 17:19:53