Datasets:
dataset_info:
features:
- name: id
dtype: string
- name: image
dtype: image
- name: mol
dtype: string
- name: smiles
dtype: string
- name: selfies
dtype: string
- name: inchi
dtype: string
splits:
- name: train
num_bytes: 6309864
num_examples: 992
download_size: 3946379
dataset_size: 6309864
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
"\_ data_files":
- split: train
"\_ \_ path": data/train-*
task_categories:
- image-to-text
tags:
- chemistry
- science
- ocsr
- ocr
- patents
pretty_name: CLEF-IP 2012 Structure Recognition Test Set
size_categories:
- n<1K
Dataset Card for CLEF-IP 2012 Structure Recognition Test Set
This dataset is the official test set from the "Chemical Structure Recognition in Images" task held as part of the CLEF-IP 2012 workshop. It contains 992 images of chemical structures extracted from US patents, each paired with a ground-truth MOL file. This Hugging Face version has been augmented with canonical SMILES, InChI, and SELFIES strings to provide a comprehensive resource for evaluating image-to-structure models, particularly on patent literature.
Dataset Details
Dataset Description
The CLEF-IP 2012 dataset was created to benchmark the performance of Optical Chemical Structure Recognition (OCSR) systems on the challenging domain of patent documents. Images in patents are often of lower quality and present more variability than those found in chemical catalogues or textbooks, making this a valuable resource for testing model robustness.
This Hugging Face dataset version processes the provided ground truth MOL files to generate canonical SMILES, InChI, and SELFIES strings using RDKit, providing a variety of useful representations for machine learning evaluation tasks.
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.
- Curated by: The original dataset was curated by Peter M. Mast, Engelbert Zass, and John M. Barnard for the CLEF-IP 2012 workshop. This Hugging Face version was prepared by Hunter Heidenreich.
- License: The data was released for the CLEF-IP 2012 research challenge. A specific license is not provided, but it is intended for research and evaluation purposes.
Dataset Sources
- Repository:
Uses
Direct Use
This dataset is a test set and is intended for evaluating Optical Chemical Structure Recognition (OCSR) models. It is particularly well-suited for measuring performance on images sourced from patent documents. It can be used for tasks such as:
- Image-to-SMILES translation
- Image-to-InChI translation
- Benchmarking OCSR tool performance on patent data
Out-of-Scope Use
This dataset should not be used for training models due to its small size and its designation as a test set. Doing so would violate the principle of separating training and testing data and lead to inflated performance metrics. The dataset's focus on patent images means models evaluated on it may not have their performance generalize to other domains like textbooks or chemical catalogues.
Dataset Structure
The dataset consists of a single split ('train', reflecting the source file structure) containing 992 examples. Each example has the following fields:
id(string): A unique identifier for the example (e.g.,US03862136-0002-MOL-2).image(image): A PIL-encoded image of the chemical structure.mol(string): The ground truth structure in MOL file format.smiles(string): The canonical SMILES string for the molecule, generated from themoldata using RDKit.inchi(string): The standard InChI string for the molecule, generated from themoldata using RDKit.selfies(string): The SELFIES (SELF-referencIng Embedded Strings) representation of the molecule, generated from thesmilesstring.
Dataset Creation
Curation Rationale
The dataset was created to provide a standardized, public benchmark for evaluating OCSR systems on patent literature. This domain is of high commercial and scientific importance, but presents unique challenges due to the quality and format of images embedded in patent documents.
Source Data
Data Collection and Processing
The source data comprises 2D chemical structure diagrams extracted from United States patent documents. The ground truth MOL files were generated and manually validated by experts at InfoChem.
This Hugging Face version uses a script to process the provided MOL files, generating canonical SMILES, InChI, and SELFIES strings for each entry using the RDKit and selfies libraries.
Who are the source data producers?
The chemical structure diagrams were originally published within US patents. The dataset was collected and curated by the organizers of the CLEF-IP 2012 "Chemical Structure Recognition in Images" task.
Bias, Risks, and Limitations
- Domain Specificity: The dataset is sourced exclusively from US patents. The style, quality, and resolution of these images may not be representative of chemical diagrams found in patents from other regions (e.g., EPO, WIPO) or in different types of documents (e.g., scientific journals, textbooks).
- Image Quality: Patent images can be of variable and often low quality, containing scanning artifacts, noise, and compression effects. While this is a feature for a robust benchmark, it's a limitation for general-purpose use.
- Small Size: As a test set of 992 examples, it provides a snapshot of performance but may not be large enough to draw statistically significant conclusions for all models.
Recommendations
Users should be aware that this dataset is a small evaluation benchmark specific to the domain of US patent images from a particular era. It should be used exclusively for testing and not for training. Performance on this dataset should be reported alongside results from other benchmarks to provide a more complete picture of a model's capabilities.
Citation
BibTeX:
@inproceedings{mast2012clef,
title={The CLEF-IP 2012 chemical structure recognition task},
author={Mast, Peter M and Zass, Engelbert and Barnard, John M},
booktitle={CLEF (Online Working Notes/Labs/Workshop)},
year={2012}
}
@article{Rajan2020,
author = {Rajan, Kohulan and Brinkhaus, Henning Otto and Zielesny, Achim and Steinbeck, Christoph},
doi = {10.1186/s13321-020-00465-0},
journal = {Journal of Cheminformatics},
title = {{A review of optical chemical structure recognition tools}},
year = {2020}
}
@misc{huggingface_dataset_CLEF,
author = {Heidenreich, Hunter},
title = {CLEF OCSR Benchmark},
year = {2025},
publisher = {Hugging Face},
journal = {Hugging Face repository},
howpublished = {\url{[https://huggingface.co/datasets/hheiden/CLEF_OCSR_benchmark](https://huggingface.co/datasets/hheiden/CLEF_OCSR_benchmark)}}
}
Dataset Card Authors
Original dataset: Peter M. Mast, Engelbert Zass, John M. Barnard
Hugging Face version: Hunter Heidenreich, hheiden
Dataset Card Contact
Hunter Heidenreich, hheiden