Artificial Intelligence
AI Predicts Chemical Makeup From Photos
Low-cost AI chemical analysis may have potential for labs and space exploration.
Posted March 25, 2025 Reviewed by Margaret Foley
Key points
- A new AI tool can predict chemical compositions from photos with high accuracy.
- Analytical chemistry is an important function for many industries and purposes.
- In the future, this could potentially be a relatively low-cost solution for labs.
Artificial intelligence (AI) machine learning is helping to transform many industries as an assistive tool for scientists. Researchers have published in Digital Discovery, a The Royal Society of Chemistry journal, a NASA-supported study that demonstrates an AI tool that can predict chemical compositions from photos with high accuracy with potential to benefit multiple industries in the future.
The Importance of Chemical Analysis
Analytical chemistry is an important function for many industries and purposes, including pharmaceutical, biotechnology, food quality and safety, material sciences, forensic science, water quality, environmental monitoring, healthcare, academic research, and space exploration.
Chemistry is the scientific study of substances, including their structure, composition, properties, reactions, interactions, and changes. Most chemical analysis is performed using instrumental analysis, versus classical analysis, which is also known as wet chemical analysis. Examples of instrumental analysis include spectroscopy, crystallography, microscopy, chromatography, electroanalytical methods, voltammetry, coulometry, potentiometry, calorimetry, thermogravimetric analysis, and many more techniques.
Why Use AI for Analytical Chemistry?
The predictive capabilities of AI machine learning models have been used in other scientific studies to identify objects, animals, plants, and people. Can an AI model also be trained to identify chemical composition from photos?
“Macroscopic deposit patterns resulting from dried solutions and dispersions are often perceived as random and without meaningful information,” wrote Florida State University professor and corresponding author Dr. Oliver Steinbock, along with co-authors Bruno Batista, Amrutha S.V., Jie Yan, and Beni Dangi. “Their formation is governed by a bewildering interplay of evaporation, crystal nucleation and growth, capillary flows, Marangoni convection, diffusion, and heat exchange that severely hinders mechanistic studies.”
The researchers hypothesized that AI could identify hard-to-detect patterns in complex chemical and residue data. The key was to have high-quality imaging data to train and test the AI algorithm.
An Innovative Approach to Training Data
The performance and accuracy of AI models rely on the quality of training data, among other factors. This is because AI machine learning algorithms learn from massive amounts of training data rather than relying on explicit programming instructions that were hard-coded by human programmers. If high-quality training databases do not exist, computer scientists need to create a database, either through real-world generation or synthetically with the help of AI and computers.
For this study, the researchers opted to create their own database of images. Given that training algorithms require massive amounts of data, the team decided to automate the process instead of resorting to laborious and repetitive manual pipetting by human lab technicians.
The scientists generated over 23,400 high-quality real-world images of dried salt solutions of seven inorganic salts and five concentration levels with the help of a robotic drop imager called RODI. The robotic system produced drops and captured images of the chemical deposits. Moreover, for every image, the traits of the chemical deposit patterns were obtained and analyzed along 47 dimensions. The information capture included textural analysis, edge characteristics, statistical analysis, spatial distribution, radial variations, structure complexity, and other descriptive factors.
With this rich, massive, high-quality database, the team was ready to train and test their AI model. The researchers divided the images produced via robotic automation into 70 percent for training and 30 percent for testing the AI model.
AI Machine Learning and Deep Learning Algorithms
Three types of AI machine learning algorithms were used for the AI model: Random Forest, XGBoost, and multi-layer perceptron (MLP). The Random Forest ensemble learning algorithm and the XGBoost optimized gradient boosting algorithm were used to detect the type of salt. The researchers found that even though there were different levels of concentration, the AI model was able to predict the type of salt with a high degree of accuracy.
The team then used a multi-layer perceptron AI deep learning algorithm to further characterize the salts and predict the concentration of the salt solution.
For complex tasks such as photo analysis, deep learning is well suited to learn and identify patterns and extract relevant features from the data. Deep learning is a subset of AI machine learning with an architecture that is inspired in part by the biological human brain. Deep learning is a fully connected deep neural network that consists of an input layer, an output layer, and many hidden layers in between with artificial neurons that are also called nodes. The deep part of deep learning refers to the many hidden processing layers in between the input and output layers.
A multi-layer perceptron is a feedforward artificial neural network with interconnected artificial neurons or nodes. The MLP deep learning algorithm for this study contained four fully connected layers with varying numbers of artificial neurons (1,024, 512, 256, and 128) on each layer.
The scientists discovered that all the three AI algorithms can be used to classify the salt type and concentration. They found that multi-layer perceptron performed the best and Random Forest was the easiest to interpret.
“We achieved prediction accuracies of 98.7% for the salt type and 92.2% for the combined salt type and initial concentration,” reported the researchers.
According to the researchers, their study shows that AI can spot the subtle crystallization deposit patterns of various drying salt solutions in the complex image data to produce highly accurate predictions on salt type and concentration of the initial solution. Moreover, the scientists see potential applications of this proof-of-concept beyond the lab and out in the field on location.
“The integration of our feature-extraction workflow with RODI's high-throughput sample collection could democratize traditionally expensive (bio)analytical measurements that are often reliant on mass spectrometry and similar specialized instruments. In an ideal scenario, these applications could be performed using solely a phone camera and an app.”
By harnessing the predictive capabilities of AI in combination with massive amounts of high-quality real-world data produced through robotic automation, the researchers of this NASA-supported study have created an innovative, relatively low-cost potential solution not only for the lab, but also out in the field in the future.
Copyright © 2025 Cami Rosso. All rights reserved.