hheiden commited on
Commit
912e727
·
verified ·
1 Parent(s): c8558fa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -164
README.md CHANGED
@@ -151,170 +151,7 @@ If you use this dataset in your work, please cite the original paper and the ben
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},
 
151
  }
152
 
153
  @misc{huggingface_dataset_UOB,
154
+ author = {Heidenreich, Hunter},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  title = {UOB OCSR Benchmark},
156
  year = {2025},
157
  publisher = {Hugging Face},