Update README.md
Browse files
README.md
CHANGED
|
@@ -136,21 +136,45 @@ print(f"Exact Match: {metrics['postprocess/exact_match_acc']:.2%}")
|
|
| 136 |
|
| 137 |
Full documentation: [Github](https://github.com/netknowledge/COMO) [PyPI](https://pypi.org/project/como-ocsr/)
|
| 138 |
|
| 139 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
| USPTO, CLEF, JPO, UOB, Staker | [Rajan et al., 2020](https://github.com/Kohulan/OCSR_Review), [Xiong et al., 2023](https://github.com/jiachengxiong/alpha-Extractor) |
|
| 151 |
-
| Indigo, ChemDraw, ACS, Staker | [Qian et al., 2023](https://github.com/thomas0809/MolScribe) |
|
| 152 |
-
| USPTO-10K | [Morin et al., 2023](https://huggingface.co/datasets/docling-project/USPTO-30K) |
|
| 153 |
-
| WildMol-10K | [Fang et al., 2025](https://github.com/orgs/Chem-Struct-ML/repositories) |
|
| 154 |
|
| 155 |
## License
|
| 156 |
|
|
|
|
| 136 |
|
| 137 |
Full documentation: [Github](https://github.com/netknowledge/COMO) [PyPI](https://pypi.org/project/como-ocsr/)
|
| 138 |
|
| 139 |
+
## Benchmark Datasets
|
| 140 |
+
|
| 141 |
+
Benchmark datasets are published as a HuggingFace Dataset with one config per benchmark:
|
| 142 |
+
**[Keylab/OCSR-Benchmarks](https://huggingface.co/datasets/Keylab/OCSR-Benchmarks)**
|
| 143 |
+
|
| 144 |
+
| Config | Size | Type |
|
| 145 |
+
|--------|-----:|------|
|
| 146 |
+
| `CLEF` | 992 | Real (patents) |
|
| 147 |
+
| `JPO` | 449 | Real (patents) |
|
| 148 |
+
| `UOB` | 5,740 | Real (academic) |
|
| 149 |
+
| `USPTO` | 5,719 | Real (patents) |
|
| 150 |
+
| `USPTO-10K` | 9,999 | Real (patents) |
|
| 151 |
+
| `Staker` | 50,000 | Real |
|
| 152 |
+
| `ACS` | 331 | Real (publications) |
|
| 153 |
+
| `WildMol-10K` | 9,889 | Real (wild) |
|
| 154 |
+
| `Indigo` | 5,719 | Synthetic |
|
| 155 |
+
| `ChemDraw` | 5,719 | Synthetic |
|
| 156 |
+
|
| 157 |
+
Each sample has three fields: `image_id` (str), `image` (PIL), `SMILES` (str).
|
| 158 |
|
| 159 |
+
```python
|
| 160 |
+
from datasets import load_dataset
|
| 161 |
+
|
| 162 |
+
# Load a single benchmark
|
| 163 |
+
ds = load_dataset("Keylab/OCSR-Benchmarks", name="USPTO", split="test")
|
| 164 |
+
sample = ds[0]
|
| 165 |
+
sample["image"].show() # PIL Image
|
| 166 |
+
print(sample["SMILES"]) # ground-truth SMILES
|
| 167 |
+
|
| 168 |
+
# Iterate over all benchmarks
|
| 169 |
+
configs = ["CLEF", "JPO", "UOB", "USPTO", "USPTO-10K",
|
| 170 |
+
"Staker", "ACS", "WildMol-10K", "Indigo", "ChemDraw"]
|
| 171 |
+
for name in configs:
|
| 172 |
+
ds = load_dataset("Keylab/OCSR-Benchmarks", name=name, split="test")
|
| 173 |
+
print(f"{name}: {len(ds)} samples")
|
| 174 |
+
```
|
| 175 |
|
| 176 |
+
Pre-packaged `.tar.gz` archives are also available for bulk download in the
|
| 177 |
+
[COMO model repository](https://huggingface.co/Keylab/COMO/tree/main/benchmarks).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
|
| 179 |
## License
|
| 180 |
|