ChemScraper: Graphics Extraction, Molecular Diagram Parsing, and Annotated Data Generation for PDF Images
Preprint
Abstract
Existing visual parsers for molecule diagrams translate pixel-based raster images such as PNGs to chemical structure representations (e.g., SMILES). However, PDFs created by word processors including LaTeX and Word provide explicit locations and shapes for characters, lines, and polygons. We extract symbols from born-digital PDF molecule images and then apply simple graph transformations to capture both visual and chemical structure in editable ChemDraw files (CDXML). Our fast ( PDF $\rightarrow$ visual graph $\rightarrow$ chemical graph ) pipeline does not require GPUs, Optical Character Recognition (OCR) or vectorization. We evaluate on standard benchmarks using SMILES strings, along with a novel evaluation that provides graph-based metrics and error compilation using LgEval. The geometric information in born-digital PDFs produces a highly accurate parser, motivating generating training data for visual parsers that recognize from raster images, with extracted graphics, visual structure, and chemical structure as annotations. To do this we render SMILES strings in Indigo, parse molecule structure, and then validate recognized structure to select correct files.
Keywords
All Related Versions
This publication has 34 references indexed in Scilit:
- Line-of-Sight with Graph Attention Parser (LGAP) for Math Formulas2023
- OCMR: A comprehensive framework for optical chemical molecular recognitionComputers in Biology and Medicine, 2023
- MolScribe: Robust Molecular Structure Recognition with Image-to-Graph GenerationJournal of Chemical Information and Modeling, 2023
- A Math Formula Extraction and Evaluation Framework for PDF Documents2021
- Molecular Structure Extraction from Documents Using Deep LearningJournal of Chemical Information and Modeling, 2019
- Advancing the state of the art for handwritten math recognition: the CROHME competitions, 2011–2014International Journal on Document Analysis and Recognition (IJDAR), 2016
- Molecular fingerprint similarity search in virtual screeningMethods, 2015
- A Linear Grammar Approach to Mathematical Formula Recognition from PDFLecture Notes in Computer Science, 2009
- Fast string correction with Levenshtein automataInternational Journal on Document Analysis and Recognition (IJDAR), 2002
- Kekule: OCR-optical chemical (structure) recognitionJournal of Chemical Information and Computer Sciences, 1992