Update README.md
Browse files
README.md
CHANGED
@@ -1,172 +1,27 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
num_bytes: 4275308
|
29 |
-
num_examples: 10
|
30 |
-
- name: part10
|
31 |
-
num_bytes: 3894232
|
32 |
-
num_examples: 10
|
33 |
-
- name: part11
|
34 |
-
num_bytes: 4446364
|
35 |
-
num_examples: 10
|
36 |
-
- name: part12
|
37 |
-
num_bytes: 3820398
|
38 |
-
num_examples: 10
|
39 |
-
- name: part13
|
40 |
-
num_bytes: 4323211
|
41 |
-
num_examples: 10
|
42 |
-
- name: part14
|
43 |
-
num_bytes: 3760233
|
44 |
-
num_examples: 10
|
45 |
-
- name: part15
|
46 |
-
num_bytes: 4293369
|
47 |
-
num_examples: 10
|
48 |
-
- name: part16
|
49 |
-
num_bytes: 4294097
|
50 |
-
num_examples: 10
|
51 |
-
- name: part17
|
52 |
-
num_bytes: 4065835
|
53 |
-
num_examples: 10
|
54 |
-
- name: part18
|
55 |
-
num_bytes: 3540881
|
56 |
-
num_examples: 10
|
57 |
-
- name: part19
|
58 |
-
num_bytes: 3826798
|
59 |
-
num_examples: 10
|
60 |
-
- name: part20
|
61 |
-
num_bytes: 4692252
|
62 |
-
num_examples: 10
|
63 |
-
- name: part21
|
64 |
-
num_bytes: 4534566
|
65 |
-
num_examples: 10
|
66 |
-
- name: part22
|
67 |
-
num_bytes: 4260706
|
68 |
-
num_examples: 10
|
69 |
-
- name: part23
|
70 |
-
num_bytes: 3774230
|
71 |
-
num_examples: 10
|
72 |
-
- name: part24
|
73 |
-
num_bytes: 4128026
|
74 |
-
num_examples: 10
|
75 |
-
- name: part25
|
76 |
-
num_bytes: 4316172
|
77 |
-
num_examples: 10
|
78 |
-
- name: part26
|
79 |
-
num_bytes: 3850438
|
80 |
-
num_examples: 10
|
81 |
-
- name: part27
|
82 |
-
num_bytes: 3376316
|
83 |
-
num_examples: 10
|
84 |
-
- name: part28
|
85 |
-
num_bytes: 4066186
|
86 |
-
num_examples: 10
|
87 |
-
- name: part29
|
88 |
-
num_bytes: 3773585
|
89 |
-
num_examples: 10
|
90 |
-
- name: part1
|
91 |
-
num_bytes: 4038594557
|
92 |
-
num_examples: 10000
|
93 |
-
- name: part2
|
94 |
-
num_bytes: 4011921705
|
95 |
-
num_examples: 10000
|
96 |
-
- name: part3
|
97 |
-
num_bytes: 4033630263
|
98 |
-
num_examples: 10000
|
99 |
-
- name: part4
|
100 |
-
num_bytes: 4013766608
|
101 |
-
num_examples: 10000
|
102 |
-
- name: part0
|
103 |
-
num_bytes: 4043989791
|
104 |
-
num_examples: 10000
|
105 |
-
download_size: 23968200707
|
106 |
-
dataset_size: 20247402553
|
107 |
-
configs:
|
108 |
-
- config_name: default
|
109 |
-
data_files:
|
110 |
-
- split: train
|
111 |
-
path: data/train-*
|
112 |
-
- split: part0
|
113 |
-
path: data/part0-*
|
114 |
-
- split: part1
|
115 |
-
path: data/part1-*
|
116 |
-
- split: part2
|
117 |
-
path: data/part2-*
|
118 |
-
- split: part3
|
119 |
-
path: data/part3-*
|
120 |
-
- split: part4
|
121 |
-
path: data/part4-*
|
122 |
-
- split: part5
|
123 |
-
path: data/part5-*
|
124 |
-
- split: part6
|
125 |
-
path: data/part6-*
|
126 |
-
- split: part7
|
127 |
-
path: data/part7-*
|
128 |
-
- split: part8
|
129 |
-
path: data/part8-*
|
130 |
-
- split: part9
|
131 |
-
path: data/part9-*
|
132 |
-
- split: part10
|
133 |
-
path: data/part10-*
|
134 |
-
- split: part11
|
135 |
-
path: data/part11-*
|
136 |
-
- split: part12
|
137 |
-
path: data/part12-*
|
138 |
-
- split: part13
|
139 |
-
path: data/part13-*
|
140 |
-
- split: part14
|
141 |
-
path: data/part14-*
|
142 |
-
- split: part15
|
143 |
-
path: data/part15-*
|
144 |
-
- split: part16
|
145 |
-
path: data/part16-*
|
146 |
-
- split: part17
|
147 |
-
path: data/part17-*
|
148 |
-
- split: part18
|
149 |
-
path: data/part18-*
|
150 |
-
- split: part19
|
151 |
-
path: data/part19-*
|
152 |
-
- split: part20
|
153 |
-
path: data/part20-*
|
154 |
-
- split: part21
|
155 |
-
path: data/part21-*
|
156 |
-
- split: part22
|
157 |
-
path: data/part22-*
|
158 |
-
- split: part23
|
159 |
-
path: data/part23-*
|
160 |
-
- split: part24
|
161 |
-
path: data/part24-*
|
162 |
-
- split: part25
|
163 |
-
path: data/part25-*
|
164 |
-
- split: part26
|
165 |
-
path: data/part26-*
|
166 |
-
- split: part27
|
167 |
-
path: data/part27-*
|
168 |
-
- split: part28
|
169 |
-
path: data/part28-*
|
170 |
-
- split: part29
|
171 |
-
path: data/part29-*
|
172 |
-
---
|
|
|
1 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/6541f9a9eccc4f48dce3d2fb/Q-6ai0oZQpIEYduDciuhK.png)
|
2 |
+
|
3 |
+
DocSynth300K is a large-scale and diverse document layout analysis pre-training dataset, which can largely boost model performance.
|
4 |
+
|
5 |
+
### Data Download
|
6 |
+
|
7 |
+
Use following command to download dataset(about 113G):
|
8 |
+
|
9 |
+
```python
|
10 |
+
from huggingface_hub import snapshot_download
|
11 |
+
# Download DocSynth300K
|
12 |
+
snapshot_download(repo_id="juliozhao/DocSynth300K", local_dir="./docsynth300k-hf", repo_type="dataset")
|
13 |
+
# If the download was disrupted and the file is not complete, you can resume the download
|
14 |
+
snapshot_download(repo_id="juliozhao/DocSynth300K", local_dir="./docsynth300k-hf", repo_type="dataset", resume_download=True)
|
15 |
+
```
|
16 |
+
|
17 |
+
### Data Formatting & Pre-training
|
18 |
+
|
19 |
+
If you want to perform DocSynth300K pretraining, using ```format_docsynth300k.py``` to convert original ```.parquet``` format into ```YOLO``` format. The converted data will be stored at ```./layout_data/docsynth300k```.
|
20 |
+
|
21 |
+
```bash
|
22 |
+
python format_docsynth300k.py
|
23 |
+
```
|
24 |
+
|
25 |
+
To perform DocSynth300K pre-training, use this [command](assets/script.sh#L2). We default use 8GPUs to perform pretraining. To reach optimal performance, you can adjust hyper-parameters such as ```imgsz```, ```lr``` according to your downstream fine-tuning data distribution or setting.
|
26 |
+
|
27 |
+
**Note:** Due to memory leakage in YOLO original data loading code, the pretraining on large-scale dataset may be interrupted unexpectedly, use ```--pretrain last_checkpoint.pt --resume``` to resume the pretraining process.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|