File size: 7,788 Bytes
71dd9c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6206247
71dd9c8
8469e17
 
 
 
71dd9c8
 
8469e17
71dd9c8
8469e17
 
 
26961b8
 
 
 
 
 
 
 
 
 
 
 
71dd9c8
26961b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
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:**
    - [Hugging Face Dataset Repo](https://huggingface.co/datasets/hheiden/CLEF-IP_2012_OCSR_test)
    - [Chemical Structure Recognition task 2012](http://www.ifs.tuwien.ac.at/~clef-ip/2012/chem.shtml)
    - [OCSR Review GitHub (Source of this version's data)](https://github.com/Kohulan/OCSR_Review)

## 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 the `mol` data using RDKit.
- `inchi` (string): The standard InChI string for the molecule, generated from the `mol` data using RDKit.
- `selfies` (string): The SELFIES (SELF-referencIng Embedded Strings) representation of the molecule, generated from the `smiles` string.

## 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:**

```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