Related Experiment Video
Updated: Oct 22, 2025

Pore-scale Imaging and Characterization of Hydrocarbon Reservoir Rock Wettability at Subsurface Conditions Using X-ray Microtomography
Published on: October 21, 2018
ChemPix: automated recognition of hand-drawn hydrocarbon structures using deep learning
Hayley Weir1,2, Keiran Thompson1,2, Amelia Woodward1
1Department of Chemistry, Stanford University Stanford CA 94305 USA toddjmartinez@gmail.com.
Abstract:
Inputting molecules into chemistry software, such as quantum chemistry packages, currently requires domain expertise, expensive software and/or cumbersome procedures. Leveraging recent breakthroughs in machine learning, we develop ChemPix: an offline, hand-drawn hydrocarbon structure recognition tool designed to remove these barriers. A neural image captioning approach consisting of a convolutional neural network (CNN) encoder and a long short-term memory (LSTM) decoder learned a mapping from photographs of hand-drawn hydrocarbon structures to machine-readable SMILES representations. We generated a large auxiliary training dataset, based on RDKit molecular images, by combining image augmentation, image degradation and background addition. Additionally, a small dataset of ∼600 hand-drawn hydrocarbon chemical structures was crowd-sourced using a phone web application. These datasets were used to train the image-to-SMILES neural network with the goal of maximizing the hand-drawn hydrocarbon recognition accuracy. By forming a committee of the trained neural networks where each network casts one vote for the predicted molecule, we achieved a nearly 10 percentage point improvement of the molecule recognition accuracy and were able to assign a confidence value for the prediction based on the number of agreeing votes. The ensemble model achieved an accuracy of 76% on hand-drawn hydrocarbons, increasing to 86% if the top 3 predictions were considered.
Related Concept Videos
Structure of Alkanes
Hydrocarbons are the simplest organic compounds composed of carbons and hydrogens. Based on the bond order between carbons, the hydrocarbons are further classified into alkanes, alkenes, and alkynes.
Alkanes are the simplest hydrocarbons with sp3 hybrid carbon atoms....
Aromatic Hydrocarbon Anions: Structural Overview
Due to the absence of continuous...
Aromatic Hydrocarbon Cations: Structural Overview
Removing one hydrogen from the intervening CH2 group...
Fischer Projections
Molecular Models
Structures of Carboxylic Acid Derivatives
Carboxylic acid derivatives contain an acyl group attached to a heteroatom such as chlorine, oxygen, or nitrogen. The carbonyl carbon and oxygen are both sp2-hybridized with an unhybridized p orbital.
The three sp2 orbitals of the carbonyl carbon form three σ bonds, one each with the carbonyl oxygen, the α carbon, and the heteroatom, whereas the other two sp2 orbitals of the carbonyl oxygen are occupied by the lone pairs. Further, the...

