CoolFace
Modelpublic

EdisonScientific/OCSRGlyph

sourceHugging Faceapache-2.0updated 21d agoView on Hugging Face
3likes
Model Card

OCSRGlyph

Installing the code

The commands below use the `glyph` package. Install it from the code repository:

bash
git clone https://github.com/EdisonScientific/glyph
cd glyph
uv venv && uv sync --extra ocsr # or: pip install -e ".[ocsr]"

See the repo's README.md (quickstart + inference) and REPRODUCE.md (frozen eval contract).

Optical Chemical Structure Recognition for ordinary molecules: image -> SMILES. Swin-B/384 image encoder + a 6-layer transformer decoder (single inference model; ImageNet-pretrained backbone, no OCSR-specific pretraining).

Results - USPTO-OCSR-5719 (greedy decode, light postprocess)

ConventionFull 5719Parseable 5704
A - canonical (full stereo)5362/5719 = 93.8%93.97%
B - chirality-kept5372/5719 = 93.9%94.14%
C - graph (connectivity)5499/5719 = 96.2%96.35%
valid SMILES-99.79%

Usage

bash
glyph ocsr eval --checkpoint EdisonScientific/OCSRGlyph --benchmark <uspto_ocsr_5719_complete.csv>

See the code repository's REPRODUCE.md for the full contract. Files: model.pth, ocsrglyph-recipe.json.

License: Apache-2.0

Citation: To be added upon publication.