ChemicalOCR is fine-tuned from
SmolDocling, a lightweight 256M-parameter model originally developed for end-to-end document conversion. By specializing for chemical images, ChemicalOCR substantially outperforms general-purpose OCR systems on chemical structure recognition tasks.
ChemicalOCR substantially outperforms existing OCR models on chemical structure benchmarks:
1from transformers import AutoProcessor, AutoModelForVision2Seq
2from PIL import Image
3
4model = AutoModelForVision2Seq.from_pretrained("docling-project/ChemicalOCR")
5processor = AutoProcessor.from_pretrained("docling-project/ChemicalOCR")
6
7image = Image.open("chemical_structure.png")
8inputs = processor(images=image, return_tensors="pt")
9outputs = model.generate(**inputs)
10result = processor.decode(outputs[0], skip_special_tokens=True)
ChemicalOCR is a key component of
MarkushGrapher-2, an end-to-end model for multimodal recognition of chemical structures from patent documents. In the MarkushGrapher-2 pipeline, ChemicalOCR provides the text and layout information that is fused with visual features for Markush structure recognition.
1@inproceedings{strohmeyer2026markushgrapher2,
2 title = {MarkushGrapher-2: End-to-end Multimodal Recognition of Chemical Structures},
3 author = {Strohmeyer, Tim and Morin, Lucas and Meijer, Gerhard Ingmar and Weber, Valery and Nassar, Ahmed and Staar, Peter W. J.},
4 booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
5 year = {2026}
6}
This model is released under the
Apache 2.0 License.