hheiden commited on
Commit
c8558fa
·
verified ·
1 Parent(s): 5c31e74

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +223 -67
README.md CHANGED
@@ -30,145 +30,301 @@ tags:
30
  - ocsr
31
  - ocr
32
  - documents
33
- pretty_name: UOB
34
  size_categories:
35
  - 1K<n<10K
36
  ---
37
 
38
- # Dataset Card for Dataset Name
39
 
40
- <!-- Provide a quick summary of the dataset. -->
41
-
42
- This dataset card aims to be a base template for new datasets. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/datasetcard_template.md?plain=1).
43
 
44
  ## Dataset Details
45
 
46
  ### Dataset Description
47
 
48
- <!-- Provide a longer summary of what this dataset is. -->
49
-
50
 
 
51
 
52
- - **Curated by:** [More Information Needed]
53
- - **Funded by [optional]:** [More Information Needed]
54
- - **Shared by [optional]:** [More Information Needed]
55
- - **Language(s) (NLP):** [More Information Needed]
56
- - **License:** [More Information Needed]
57
 
58
- ### Dataset Sources [optional]
 
59
 
60
- <!-- Provide the basic links for the dataset. -->
61
 
62
- - **Repository:** [More Information Needed]
63
- - **Paper [optional]:** [More Information Needed]
64
- - **Demo [optional]:** [More Information Needed]
 
 
 
 
65
 
66
  ## Uses
67
 
68
- <!-- Address questions around how the dataset is intended to be used. -->
69
-
70
  ### Direct Use
71
 
72
- <!-- This section describes suitable use cases for the dataset. -->
73
 
74
- [More Information Needed]
 
 
 
75
 
76
  ### Out-of-Scope Use
77
 
78
- <!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
79
-
80
- [More Information Needed]
81
 
82
  ## Dataset Structure
83
 
84
- <!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
85
 
86
- [More Information Needed]
 
 
 
 
 
87
 
88
  ## Dataset Creation
89
 
90
  ### Curation Rationale
91
 
92
- <!-- Motivation for the creation of this dataset. -->
93
-
94
- [More Information Needed]
95
 
96
  ### Source Data
97
 
98
- <!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
99
-
100
  #### Data Collection and Processing
101
 
102
- <!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
 
 
 
 
 
103
 
104
- [More Information Needed]
105
 
106
  #### Who are the source data producers?
107
 
108
- <!-- This section describes the people or systems who originally created the data. It should also include self-reported demographic or identity information for the source data creators if this information is available. -->
109
-
110
- [More Information Needed]
111
 
112
  ### Annotations [optional]
113
 
114
- <!-- If the dataset contains annotations which are not part of the initial data collection, use this section to describe them. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
 
116
- #### Annotation process
117
 
118
- <!-- This section describes the annotation process such as annotation tools used in the process, the amount of data annotated, annotation guidelines provided to the annotators, interannotator statistics, annotation validation, etc. -->
119
 
120
- [More Information Needed]
121
 
122
- #### Who are the annotators?
123
 
124
- <!-- This section describes the people or systems who created the annotations. -->
125
 
126
- [More Information Needed]
127
 
128
- #### Personal and Sensitive Information
 
129
 
130
- <!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
131
 
132
- [More Information Needed]
 
 
 
 
 
 
133
 
134
- ## Bias, Risks, and Limitations
 
 
135
 
136
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
137
 
138
- [More Information Needed]
 
 
139
 
140
- ### Recommendations
141
 
142
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
143
 
144
- Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations.
145
 
146
- ## Citation [optional]
147
 
148
- <!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
 
 
 
 
 
149
 
150
- **BibTeX:**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
- [More Information Needed]
153
 
154
- **APA:**
155
 
156
- [More Information Needed]
157
 
158
- ## Glossary [optional]
159
 
160
- <!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
161
 
162
- [More Information Needed]
 
 
163
 
164
- ## More Information [optional]
165
 
166
- [More Information Needed]
167
 
168
- ## Dataset Card Authors [optional]
169
 
170
- [More Information Needed]
171
 
172
- ## Dataset Card Contact
173
 
174
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  - ocsr
31
  - ocr
32
  - documents
33
+ pretty_name: UOB OCSR Benchmark
34
  size_categories:
35
  - 1K<n<10K
36
  ---
37
 
38
+ # Dataset Card for UOB OCSR Benchmark
39
 
40
+ This dataset is a benchmark for Optical Chemical Structure Recognition (OCSR), containing 5,740 images of chemical structures. Originally created by the University of Birmingham, each image is paired with its corresponding MOL file. This version has been augmented with canonical SMILES, InChI, and SELFIES strings to provide a comprehensive resource for training and evaluating image-to-structure models.
 
 
41
 
42
  ## Dataset Details
43
 
44
  ### Dataset Description
45
 
46
+ The UOB OCSR Benchmark dataset was created for the development and evaluation of systems that recognize and digitize chemical structures from images. The data originates from one of Maybridge's catalogues for drug design and discovery.
 
47
 
48
+ The original creation process involved scanning catalogue pages, automatically clipping the 2D structure diagrams along with their CAS numbers, and then using the CAS numbers to retrieve InChI identifiers from online databases. These InChI identifiers were subsequently converted into MOL file format using OpenBabel.
49
 
50
+ This particular version of the dataset was sourced from the benchmark suite compiled for the paper "A review of optical chemical structure recognition tools" by Rajan et al. In that benchmark, the original TIFF images were converted to 72dpi PNG files. This Hugging Face dataset version further processes the provided MOL files to generate canonical SMILES, InChI, and SELFIES strings using RDKit, providing a variety of useful representations for machine learning tasks.
 
 
 
 
51
 
52
+ - **Curated by:** The original dataset was curated by Noureddin M. Sadawi, Alan P. Sexton, and Volker Sorge. This Hugging Face version was prepared by Hunter Heidenreich.
53
+ - **License:** mit
54
 
55
+ ### Dataset Sources
56
 
57
+ - **Repository:**
58
+ - [Hugging Face Dataset Repo](https://huggingface.co/datasets/hheiden/UOB_OCSR_benchmark)
59
+ - [OCSR Review GitHub (Source of this version's data)](https://github.com/Kohulan/OCSR_Review)
60
+ - [Original Dataset Homepage (Archived)](https://web.archive.org/web/20170720141925/http://www.cs.bham.ac.uk/research/groupings/reasoning/sdag/mol-dataset.php)
61
+ - **Paper:**
62
+ - [Chemical structure recognition: a rule-based approach (Original Dataset Paper)](https://doi.org/10.1117/12.912185)
63
+ - [A review of optical chemical structure recognition tools (Benchmark Paper)](https://doi.org/10.1186/s13321-020-00465-0)
64
 
65
  ## Uses
66
 
 
 
67
  ### Direct Use
68
 
69
+ This dataset is primarily intended for evaluating Optical Chemical Structure Recognition (OCSR) models. The goal is to take an image of a chemical structure as input and predict its molecular representation (e.g., MOL, SMILES, InChI). It can be used for tasks such as:
70
 
71
+ - Image-to-SMILES translation
72
+ - Image-to-InChI translation
73
+ - Image-to-SELFIES translation
74
+ - Benchmarking OCSR tool performance
75
 
76
  ### Out-of-Scope Use
77
 
78
+ The dataset consists of relatively clean, well-segmented images from a single catalogue source. This dataset is **not** meant for training.
 
 
79
 
80
  ## Dataset Structure
81
 
82
+ The dataset consists of a single split ('train') containing 5,740 examples. Each example has the following fields:
83
 
84
+ - `id` (string): A unique identifier for the example, derived from the original filename (e.g., `maybridge-1025-000000001`).
85
+ - `image` (image): A PIL-encoded image of the chemical structure.
86
+ - `mol` (string): The ground truth structure in MOL file format.
87
+ - `smiles` (string): The canonical SMILES string for the molecule, generated from the `mol` data using RDKit.
88
+ - `inchi` (string): The standard InChI string for the molecule, generated from the `mol` data using RDKit.
89
+ - `selfies` (string): The SELFIES (SELF-referencIng Embedded Strings) representation of the molecule, generated from the `smiles` string.
90
 
91
  ## Dataset Creation
92
 
93
  ### Curation Rationale
94
 
95
+ The dataset was originally created to provide a standardized benchmark for evaluating the performance of OCSR software, developed alongside the MolRec tool at the University of Birmingham.
 
 
96
 
97
  ### Source Data
98
 
 
 
99
  #### Data Collection and Processing
100
 
101
+ The source data comprises 2D chemical structure diagrams from a Maybridge drug design catalogue. The original curation process was as follows:
102
+ 1. Catalogue pages were scanned as RGB images at 600x600 dpi.
103
+ 2. Images were thresholded using Otsu's method.
104
+ 3. A bespoke tool automatically clipped structures and their corresponding CAS numbers.
105
+ 4. CAS numbers were used to look up InChI identifiers in online databases.
106
+ 5. The InChI identifiers were converted into MOL files using the OpenBabel toolkit.
107
 
108
+ This Hugging Face version is based on data from the `Kohulan/OCSR_Review` repository, which converted the original `.tif` images to `.png` format. A custom script was then used to process the MOL files, generating canonical SMILES, InChI, and SELFIES strings for each entry using the RDKit and `selfies` libraries.
109
 
110
  #### Who are the source data producers?
111
 
112
+ The chemical structure diagrams were originally produced by Maybridge. The dataset was collected and curated by Noureddin M. Sadawi, Alan P. Sexton, and Volker Sorge at the University of Birmingham.
 
 
113
 
114
  ### Annotations [optional]
115
 
116
+ The dataset does not contain manual annotations. The ground truth labels (MOL, SMILES, etc.) are derived programmatically from the chemical identifiers associated with the images in the source catalogue.
117
+
118
+ ## Bias, Risks, and Limitations
119
+
120
+ - **Source Homogeneity:** The dataset is sourced from a single catalogue. This means the images share a consistent style, font, and quality, which may not be representative of the diversity of chemical diagrams found in other sources like scientific literature or patents.
121
+ - **Image Quality:** The images in this version were converted from 600dpi TIFFs to 72dpi PNGs for a previous benchmark study. This downsampling may have resulted in a loss of detail compared to the original scans.
122
+ - **Cleanliness:** The images are generally clean and well-segmented. This makes the dataset less challenging than real-world scenarios where diagrams might be noisy, occluded, or surrounded by other text and figures.
123
+
124
+ ### Recommendations
125
+
126
+ Users should be aware of the dataset's limitations. Users should only ever use this for testing their OCSR models.
127
+
128
+ ## Citation
129
+
130
+ If you use this dataset in your work, please cite the original paper and the benchmark review. It is also recommended to cite this dataset card to ensure reproducibility.
131
+
132
+ **BibTeX:**
133
+
134
+ ```bibtex
135
+ @inproceedings{sadawi2012chemical,
136
+ title={Chemical structure recognition: a rule-based approach},
137
+ author={Sadawi, Noureddin M and Sexton, Alan P and Sorge, Volker},
138
+ booktitle={Document recognition and retrieval XIX},
139
+ volume={8297},
140
+ pages={101--109},
141
+ year={2012},
142
+ organization={SPIE}
143
+ }
144
+
145
+ @article{Rajan2020,
146
+ author = {Rajan, Kohulan and Brinkhaus, Henning Otto and Zielesny, Achim and Steinbeck, Christoph},
147
+ doi = {10.1186/s13321-020-00465-0},
148
+ journal = {Journal of Cheminformatics},
149
+ title = {{A review of optical chemical structure recognition tools}},
150
+ year = {2020}
151
+ }
152
+
153
+ @misc{huggingface_dataset_UOB,
154
+ author = {[Your Name/Handle]},
155
+ title = {UOB OCSR Benchmark},
156
+ year = {2025},
157
+ publisher = {Hugging Face},
158
+ journal = {Hugging Face repository},
159
+ howpublished = {\url{[https://huggingface.co/datasets/hheiden/UOB_OCSR_benchmark](https://huggingface.co/datasets/hheiden/UOB_OCSR_benchmark)}}
160
+ }
161
+ ```
162
+
163
+ Of course. Based on the information you provided, here is a completed dataset card. I've filled in the details by synthesizing the original dataset's description, the context from the OCSR review benchmark, and the processing steps from your Python script.
164
+
165
+ ---
166
+ dataset_info:
167
+ features:
168
+ - name: id
169
+ dtype: string
170
+ - name: image
171
+ dtype: image
172
+ - name: mol
173
+ dtype: string
174
+ - name: smiles
175
+ dtype: string
176
+ - name: selfies
177
+ dtype: string
178
+ - name: inchi
179
+ dtype: string
180
+ splits:
181
+ - name: train
182
+ num_bytes: 27937697
183
+ num_examples: 5740
184
+ download_size: 20547603
185
+ dataset_size: 27937697
186
+ configs:
187
+ - config_name: default
188
+ data_files:
189
+ - split: train
190
+ path: data/train-*
191
+ license: mit
192
+ tags:
193
+ - chemistry
194
+ - ocsr
195
+ - ocr
196
+ - documents
197
+ pretty_name: UOB OCSR Benchmark
198
+ size_categories:
199
+ - 1K<n<10K
200
+ ---
201
+
202
+ # Dataset Card for UOB OCSR Benchmark
203
 
204
+ This dataset is a benchmark for Optical Chemical Structure Recognition (OCSR), containing 5,740 images of chemical structures. Originally created by the University of Birmingham, each image is paired with its corresponding MOL file. This version has been augmented with canonical SMILES, InChI, and SELFIES strings to provide a comprehensive resource for training and evaluating image-to-structure models.
205
 
206
+ ## Dataset Details
207
 
208
+ ### Dataset Description
209
 
210
+ The UOB OCSR Benchmark dataset was created for the development and evaluation of systems that recognize and digitize chemical structures from images. The data originates from one of Maybridge's catalogues for drug design and discovery.
211
 
212
+ The original creation process involved scanning catalogue pages, automatically clipping the 2D structure diagrams along with their CAS numbers, and then using the CAS numbers to retrieve InChI identifiers from online databases. These InChI identifiers were subsequently converted into MOL file format using OpenBabel.
213
 
214
+ This particular version of the dataset was sourced from the benchmark suite compiled for the paper "A review of optical chemical structure recognition tools" by Rajan et al. In that benchmark, the original TIFF images were converted to 72dpi PNG files. This Hugging Face dataset version further processes the provided MOL files to generate canonical SMILES, InChI, and SELFIES strings using RDKit, providing a variety of useful representations for machine learning tasks.
215
 
216
+ - **Curated by:** The original dataset was curated by Noureddin M. Sadawi, Alan P. Sexton, and Volker Sorge. This Hugging Face version was prepared by [Your Name/Handle, e.g., hheiden].
217
+ - **License:** mit
218
 
219
+ ### Dataset Sources
220
 
221
+ - **Repository:**
222
+ - [Hugging Face Dataset Repo](https://huggingface.co/datasets/hheiden/UOB_OCSR_benchmark)
223
+ - [OCSR Review GitHub (Source of this version's data)](https://github.com/Kohulan/OCSR_Review)
224
+ - [Original Dataset Homepage (Archived)](https://web.archive.org/web/20170720141925/http://www.cs.bham.ac.uk/research/groupings/reasoning/sdag/mol-dataset.php)
225
+ - **Paper:**
226
+ - [Chemical structure recognition: a rule-based approach (Original Dataset Paper)](https://doi.org/10.1117/12.912185)
227
+ - [A review of optical chemical structure recognition tools (Benchmark Paper)](https://doi.org/10.1186/s13321-020-00465-0)
228
 
229
+ ## Uses
230
+
231
+ ### Direct Use
232
 
233
+ This dataset is primarily intended for training and evaluating Optical Chemical Structure Recognition (OCSR) models. The goal is to take an image of a chemical structure as input and predict its molecular representation (e.g., MOL, SMILES, InChI). It can be used for tasks such as:
234
 
235
+ - Image-to-SMILES translation
236
+ - Image-to-InChI translation
237
+ - Benchmarking OCSR tool performance
238
 
239
+ ### Out-of-Scope Use
240
 
241
+ The dataset consists of relatively clean, well-segmented images from a single catalogue source. Therefore, models trained solely on this dataset may not generalize well to "in-the-wild" chemical diagrams from patents, journals, or handwritten notes, which often contain significant noise, annotations, and stylistic variations.
242
 
243
+ ## Dataset Structure
244
 
245
+ The dataset consists of a single split ('train') containing 5,740 examples. Each example has the following fields:
246
 
247
+ - `id` (string): A unique identifier for the example, derived from the original filename (e.g., `maybridge-1025-000000001`).
248
+ - `image` (image): A PIL-encoded image of the chemical structure.
249
+ - `mol` (string): The ground truth structure in MOL file format.
250
+ - `smiles` (string): The canonical SMILES string for the molecule, generated from the `mol` data using RDKit.
251
+ - `inchi` (string): The standard InChI string for the molecule, generated from the `mol` data using RDKit.
252
+ - `selfies` (string): The SELFIES (SELF-referencIng Embedded Strings) representation of the molecule, generated from the `smiles` string.
253
 
254
+ ## Dataset Creation
255
+
256
+ ### Curation Rationale
257
+
258
+ The dataset was originally created to provide a standardized benchmark for evaluating the performance of OCSR software, developed alongside the MolRec tool at the University of Birmingham.
259
+
260
+ ### Source Data
261
+
262
+ #### Data Collection and Processing
263
+
264
+ The source data comprises 2D chemical structure diagrams from a Maybridge drug design catalogue. The original curation process was as follows:
265
+ 1. Catalogue pages were scanned as RGB images at 600x600 dpi.
266
+ 2. Images were thresholded using Otsu's method.
267
+ 3. A bespoke tool automatically clipped structures and their corresponding CAS numbers.
268
+ 4. CAS numbers were used to look up InChI identifiers in online databases.
269
+ 5. The InChI identifiers were converted into MOL files using the OpenBabel toolkit.
270
+
271
+ This Hugging Face version is based on data from the `Kohulan/OCSR_Review` repository, which converted the original `.tif` images to `.png` format. A custom script was then used to process the MOL files, generating canonical SMILES, InChI, and SELFIES strings for each entry using the RDKit and `selfies` libraries.
272
 
273
+ #### Who are the source data producers?
274
 
275
+ The chemical structure diagrams were originally produced by Maybridge. The dataset was collected and curated by Noureddin M. Sadawi, Alan P. Sexton, and Volker Sorge at the University of Birmingham.
276
 
277
+ ### Annotations [optional]
278
 
279
+ The dataset does not contain manual annotations. The ground truth labels (MOL, SMILES, etc.) are derived programmatically from the chemical identifiers associated with the images in the source catalogue.
280
 
281
+ ## Bias, Risks, and Limitations
282
 
283
+ - **Source Homogeneity:** The dataset is sourced from a single catalogue. This means the images share a consistent style, font, and quality, which may not be representative of the diversity of chemical diagrams found in other sources like scientific literature or patents.
284
+ - **Image Quality:** The images in this version were converted from 600dpi TIFFs to 72dpi PNGs for a previous benchmark study. This downsampling may have resulted in a loss of detail compared to the original scans.
285
+ - **Cleanliness:** The images are generally clean and well-segmented. This makes the dataset less challenging than real-world scenarios where diagrams might be noisy, occluded, or surrounded by other text and figures.
286
 
287
+ ### Recommendations
288
 
289
+ Users should be aware of the dataset's limitations. For developing robust, general-purpose OCSR tools, it is recommended to supplement training with data from more diverse and noisy sources. This dataset serves as an excellent baseline and standardized benchmark for clean, published chemical diagrams.
290
 
291
+ ## Citation
292
 
293
+ If you use this dataset in your work, please cite the original paper and the benchmark review. It is also recommended to cite this dataset card to ensure reproducibility.
294
 
295
+ **BibTeX:**
296
 
297
+ ```bibtex
298
+ @inproceedings{sadawi2012chemical,
299
+ title={Chemical structure recognition: a rule-based approach},
300
+ author={Sadawi, Noureddin M and Sexton, Alan P and Sorge, Volker},
301
+ booktitle={Document recognition and retrieval XIX},
302
+ volume={8297},
303
+ pages={101--109},
304
+ year={2012},
305
+ organization={SPIE}
306
+ }
307
+
308
+ @article{Rajan2020,
309
+ author = {Rajan, Kohulan and Brinkhaus, Henning Otto and Zielesny, Achim and Steinbeck, Christoph},
310
+ doi = {10.1186/s13321-020-00465-0},
311
+ journal = {Journal of Cheminformatics},
312
+ title = {{A review of optical chemical structure recognition tools}},
313
+ year = {2020}
314
+ }
315
+
316
+ @misc{huggingface_dataset_UOB,
317
+ author = {[Your Name/Handle]},
318
+ title = {UOB OCSR Benchmark},
319
+ year = {2025},
320
+ publisher = {Hugging Face},
321
+ journal = {Hugging Face repository},
322
+ howpublished = {\url{[https://huggingface.co/datasets/hheiden/UOB_OCSR_benchmark](https://huggingface.co/datasets/hheiden/UOB_OCSR_benchmark)}}
323
+ }
324
+ ```
325
+
326
+ ## Dataset Card Authors
327
+
328
+ Original dataset: Noureddin M. Sadawi, Alan P. Sexton, Volker Sorge
329
+
330
+ Hugging Face version: Hunter Heidenreich, hheiden