Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -24,4 +24,117 @@ configs:
|
|
| 24 |
data_files:
|
| 25 |
- split: train
|
| 26 |
path: data/train-*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
data_files:
|
| 25 |
- split: train
|
| 26 |
path: data/train-*
|
| 27 |
+
task_categories:
|
| 28 |
+
- image-to-text
|
| 29 |
+
tags:
|
| 30 |
+
- chemistry
|
| 31 |
+
- science
|
| 32 |
+
- ocsr
|
| 33 |
+
- ocr
|
| 34 |
+
pretty_name: Japanese Patent Office OCSR Benchmark
|
| 35 |
+
size_categories:
|
| 36 |
+
- n<1K
|
| 37 |
---
|
| 38 |
+
# Dataset Card for Japanese Patent Office OCSR Benchmark
|
| 39 |
+
|
| 40 |
+
This dataset is a challenging benchmark for Optical Chemical Structure Recognition (OCSR), consisting of 450 images of organic molecules sourced from the Japanese Patent Office (JPO). It is a subset of the larger Chem-Infty dataset and is notable for its inclusion of noisy images, irregular features, and embedded text labels (sometimes in Japanese). This Hugging Face version includes the ground truth SDF files and adds derived SMILES, InChI, and SELFIES representations for use in modern machine learning pipelines.
|
| 41 |
+
|
| 42 |
+
## Dataset Details
|
| 43 |
+
|
| 44 |
+
### Dataset Description
|
| 45 |
+
|
| 46 |
+
The Japanese Patent Office (JPO) OCSR Benchmark provides a valuable resource for testing the robustness of OCSR systems. The 450 images were selected from the Chem-Infty dataset, created by Koji Nakagawa, Akio Fujiyoshi, and Masakazu Suzuki.
|
| 47 |
+
|
| 48 |
+
This subset is particularly useful as a difficult test set because it reflects real-world complexities often absent in cleaner, more curated datasets. Many images contain significant noise, variations in line thickness, and textual labels directly on or near the chemical structures. These characteristics make it an excellent benchmark for evaluating how well an OCSR model generalizes to less-than-ideal conditions.
|
| 49 |
+
|
| 50 |
+
This Hugging Face version, prepared by Hunter Heidenreich, standardizes the dataset by processing the provided ground truth SDF files with RDKit to generate canonical SMILES, standard InChI, and SELFIES strings.
|
| 51 |
+
|
| 52 |
+
- **Curated by:** Original Chem-Infty dataset by Koji Nakagawa, Akio Fujiyoshi, and Masakazu Suzuki. This Hugging Face version was prepared by Hunter Heidenreich.
|
| 53 |
+
- **License:** Creative Commons Attribution-Noncommercial-No Derivative Works 2.1 Japan License (CC BY-NC-ND 2.1 JP).
|
| 54 |
+
|
| 55 |
+
### Dataset Sources
|
| 56 |
+
|
| 57 |
+
- **Repository:**
|
| 58 |
+
- [Hugging Face Dataset Repo](https://huggingface.co/datasets/hheiden/JPO_OCSR_benchmark)
|
| 59 |
+
- [Original Dataset Source (OSRA Validation page)](https://sourceforge.net/p/osra/wiki/Validation/)
|
| 60 |
+
- **Paper:**
|
| 61 |
+
- [Robust Method of Segmentation and Recognition of Chemical Structure Images in ChemInfty (Original Dataset Paper)](https://www.researchgate.net/publication/229042881_Robust_Method_of_Segmentation_and_Recognition_of_Chemical_Structure_Images_in_ChemInfty)
|
| 62 |
+
|
| 63 |
+
## Uses
|
| 64 |
+
|
| 65 |
+
### Direct Use
|
| 66 |
+
|
| 67 |
+
This dataset is primarily intended for the evaluation and robustness testing of OCSR models. Its unique challenges make it an ideal "stress test" for systems trained on cleaner data. It can be used to:
|
| 68 |
+
|
| 69 |
+
- Benchmark OCSR performance on noisy, real-world patent images.
|
| 70 |
+
- Analyze model failure cases related to image artifacts and embedded text.
|
| 71 |
+
- Fine-tune models to improve their robustness.
|
| 72 |
+
|
| 73 |
+
### Out-of-Scope Use
|
| 74 |
+
|
| 75 |
+
Due to its small size (450 examples), this dataset is not suitable for training large deep learning models from scratch. It is best utilized as a validation or test set. The dataset is also limited to organic molecules from a single source (JPO) and may not represent the full diversity of chemical structures or diagram styles.
|
| 76 |
+
|
| 77 |
+
## Dataset Structure
|
| 78 |
+
|
| 79 |
+
The dataset contains a single `train` split with 450 examples. Each example has the following features:
|
| 80 |
+
|
| 81 |
+
- `id` (string): The unique identifier for the example, from the original filename.
|
| 82 |
+
- `image` (image): A PIL-encoded image of the chemical structure.
|
| 83 |
+
- `sdf` (string): The ground truth structure in SDF (Structure-Data File) format.
|
| 84 |
+
- `smiles` (string): The canonical SMILES string for the molecule, generated from the `sdf` data using RDKit.
|
| 85 |
+
- `selfies` (string): The SELFIES (SELF-referencIng Embedded Strings) representation, generated from the `smiles` string.
|
| 86 |
+
- `inchi` (string): The standard InChI string for the molecule, generated from the `sdf` data using RDKit.
|
| 87 |
+
|
| 88 |
+
## Dataset Creation
|
| 89 |
+
|
| 90 |
+
### Curation Rationale
|
| 91 |
+
|
| 92 |
+
The dataset was curated to provide researchers with a challenging, real-world benchmark for OCSR derived from the complex and noisy environment of patent documents.
|
| 93 |
+
|
| 94 |
+
### Source Data
|
| 95 |
+
|
| 96 |
+
#### Data Collection and Processing
|
| 97 |
+
|
| 98 |
+
The data is a subset of the larger Chem-Infty dataset, which was created from documents filed with the Japanese Patent Office. This specific subset, containing 450 organic molecules, was distributed with permission from the original authors.
|
| 99 |
+
|
| 100 |
+
For this Hugging Face Hub version, a script was used to process the provided ground truth SDF files. The script, written by Hunter Heidenreich, employed the RDKit library to parse the SDF data and generate canonical SMILES and InChI strings, and the `selfies` library to create SELFIES representations.
|
| 101 |
+
|
| 102 |
+
#### Who are the source data producers?
|
| 103 |
+
|
| 104 |
+
The source diagrams originate from documents submitted to the Japanese Patent Office. The dataset itself was curated by the Chem-Infty project team at Tokyo University of Agriculture and Technology.
|
| 105 |
+
|
| 106 |
+
## Bias, Risks, and Limitations
|
| 107 |
+
|
| 108 |
+
This dataset's primary value comes from its challenges, which are also its main limitations for general-purpose use.
|
| 109 |
+
|
| 110 |
+
- **High Noise and Low Quality:** The images are explicitly chosen to be challenging and often contain significant noise, scanning artifacts, and low resolution.
|
| 111 |
+
- **Irregular Features:** Diagrams frequently include variable line thicknesses and embedded text labels, sometimes with Japanese characters, which can interfere with recognition algorithms.
|
| 112 |
+
- **Small Scale:** With only 450 examples, performance metrics on this dataset may have high variance. It is insufficient for training large models.
|
| 113 |
+
- **Domain Specificity:** The data is specific to JPO documents and is limited to organic molecules.
|
| 114 |
+
|
| 115 |
+
### Recommendations
|
| 116 |
+
|
| 117 |
+
This dataset should be used as a supplementary evaluation set to test model robustness, not as a primary training or validation set. Performance on this dataset should be interpreted as a measure of a model's ability to handle difficult, noisy, and artifact-laden images.
|
| 118 |
+
|
| 119 |
+
## Citation
|
| 120 |
+
|
| 121 |
+
If you use this dataset, please cite the original Chem-Infty paper and this Hugging Face dataset to ensure reproducibility.
|
| 122 |
+
|
| 123 |
+
**BibTeX:**
|
| 124 |
+
|
| 125 |
+
```bibtex
|
| 126 |
+
@inproceedings{fujiyoshi2011robust,
|
| 127 |
+
title={Robust Method of Segmentation and Recognition of Chemical Structure Images in ChemInfty},
|
| 128 |
+
author={Fujiyoshi, Akio and Nakagawa, Koji and Suzuki, Masakazu},
|
| 129 |
+
year={2011}
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
@misc{huggingface_dataset_JPO,
|
| 133 |
+
author = {Heidenreich, Hunter},
|
| 134 |
+
title = {Japanese Patent Office OCSR Benchmark},
|
| 135 |
+
year = {2025},
|
| 136 |
+
publisher = {Hugging Face},
|
| 137 |
+
journal = {Hugging Face repository},
|
| 138 |
+
howpublished = {\url{[https://huggingface.co/datasets/hheiden/JPO_OCSR_benchmark](https://huggingface.co/datasets/hheiden/JPO_OCSR_benchmark)}}
|
| 139 |
+
}
|
| 140 |
+
```
|