File size: 5,142 Bytes
dc22641
 
6676d2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24500b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9c532c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dc22641
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6676d2e
 
 
 
24500b8
 
 
 
9c532c1
 
 
 
dc22641
 
 
 
 
 
 
ffe6fb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e90868c
ffe6fb3
 
 
 
 
b027499
 
 
 
 
 
 
 
 
ffe6fb3
 
 
 
 
 
 
 
 
 
 
 
0799a2d
 
c39a264
 
1eb2eb3
c39a264
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
---
dataset_info:
- config_name: ip5-markush
  features:
  - name: id
    dtype: string
  - name: page_image_path
    dtype: string
  - name: annotation
    dtype: string
  - name: cxsmiles_dataset
    dtype: string
  - name: cxsmiles
    dtype: string
  - name: cxsmiles_opt
    dtype: string
  - name: cells
    list:
    - name: bbox
      list: float64
    - name: text
      dtype: string
  - name: page_image
    dtype: image
  splits:
  - name: test
    num_bytes: 84715528
    num_examples: 878
  download_size: 84505277
  dataset_size: 84715528
- config_name: m2s
  features:
  - name: id
    dtype: int64
  - name: image_name
    dtype: string
  - name: page_image
    dtype: image
  - name: annotation
    dtype: string
  - name: cxsmiles_dataset
    dtype: string
  - name: cxsmiles
    dtype: string
  - name: cxsmiles_opt
    dtype: string
  - name: cells
    list:
    - name: bbox
      list: float64
    - name: text
      dtype: string
  splits:
  - name: test
    num_bytes: 18029421
    num_examples: 103
  download_size: 17985733
  dataset_size: 18029421
- config_name: uspto-markush
  features:
  - name: id
    dtype: int64
  - name: image_name
    dtype: string
  - name: page_image
    dtype: image
  - name: annotation
    dtype: string
  - name: cxsmiles_dataset
    dtype: string
  - name: cxsmiles
    dtype: string
  - name: cxsmiles_opt
    dtype: string
  - name: cells
    list:
    - name: bbox
      list: float64
    - name: text
      dtype: string
  splits:
  - name: test
    num_bytes: 5196740
    num_examples: 74
  download_size: 5179068
  dataset_size: 5196740
- config_name: uspto-mol-m-54k
  features:
  - name: id
    dtype: int64
  - name: image_name
    dtype: string
  - name: page_image
    dtype: image
  - name: annotation
    dtype: string
  - name: cxsmiles_dataset
    dtype: string
  - name: cxsmiles
    dtype: string
  - name: cxsmiles_opt
    dtype: string
  - name: cells
    list:
    - name: bbox
      list: float64
    - name: text
      dtype: string
  splits:
  - name: train
    num_bytes: 2707938707
    num_examples: 54785
  - name: test
    num_bytes: 10645945
    num_examples: 200
  download_size: 2675522805
  dataset_size: 2718584652
configs:
- config_name: ip5-markush
  data_files:
  - split: test
    path: ip5-markush/test-*
- config_name: m2s
  data_files:
  - split: test
    path: m2s/test-*
- config_name: uspto-markush
  data_files:
  - split: test
    path: uspto-markush/test-*
- config_name: uspto-mol-m-54k
  data_files:
  - split: train
    path: uspto-mol-m-54k/train-*
  - split: test
    path: uspto-mol-m-54k/test-*
---

# MarkushGrapher 2 Datasets

Datasets for training and evaluating **MarkushGrapher 2**, a model for converting patent Markush structure images into CXSMILES representations.

## Dataset Subsets

| Subset | Train | Test | Description | OCR |
|---|---|---|---|---|
| `uspto-mol-m-54k-new` | 54,785 | 200 | USPTO-MOL-M Markush samples | ChemicalOCR predictions |
| `uspto-markush` | — | 74 | USPTO Markush structures benchmark | Ground Truth OCR |
| `m2s` | — | 103 | Mol2Smiles (M2S) benchmark | Ground Truth OCR |
| `IP5-markush` | — | 878 | IP5 Markush structures benchmark | Ground Truth OCR |

## Features

Each sample contains:

- **`page_image`** — Input patent image (PIL Image, typically 1024×1024)
- **`cells`** — OCR-detected text cells with bounding boxes (`bbox` in normalized coordinates, `text`)
- **`cxsmiles`** — Ground truth CXSMILES representation
- **`cxsmiles_opt`** — Optimized (tokenizer-friendly) CXSMILES representation
- **`cxsmiles_dataset`** — Original CXSMILES from the source dataset
- **`annotation`** — Annotation metadata (used to train model)
- **`image_name`** — Source image filename
- **`id`** — Sample identifier

## Usage

```python
from datasets import load_dataset

# Load a specific subset
dataset = load_dataset("docling-project/MarkushGrapher-2-Datasets", "uspto-mol-m-54k")

# Load a benchmark subset
benchmark = load_dataset("docling-project/MarkushGrapher-2-Datasets", "m2s")
```

## Note

**MarkushGrapher-2** is also trained on the following datasets:

- **Phase 1:** 243k real-world image–SMILES pairs from [MolScribe](https://huggingface.co/yujieq/MolScribe)

- **Phase 2:**
  - 235k synthetically generated image–CXSMILES pairs from [MarkushGrapher-Datasets (v1)](https://huggingface.co/datasets/docling-project/MarkushGrapher-Datasets/viewer/markushgrapher-synthetic-training)
  - 91k samples from [MolParser Dataset](https://huggingface.co/datasets/UniParser/MolParser-7M/viewer/sft_real)
## Citation

If you use this dataset, please cite:

```bibtex
@inproceedings{strohmeyer2026markushgrapher2,
  title     = {MarkushGrapher-2: End-to-end Multimodal Recognition of Chemical Structures},
  author    = {Strohmeyer, Tim and Morin, Lucas and Meijer, Gerhard Ingmar and Weber, Valery and Nassar, Ahmed and Staar, Peter W. J.},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year      = {2026}
}
```


### License

This Dataset is released under the Creative Commons Attribution 4.0 License.