Scientists and engineers at Lawrence Livermore National Laboratory (LLNL) have developed a camera-based inspection system that can monitor complex 3D-printed structures layer by layer, using AI and machine learning (ML) to measure tiny variations and potentially identify problems before a part ever leaves the printer.
The approach could reduce the time and labor required to inspect components produced through direct ink writing, an additive manufacturing (AM) technique that deposits soft or paste-like materials through a nozzle in thin, precisely arranged strands. It also presents a way to examine large, intricate parts that may be difficult to inspect in full using conventional X-ray computed tomography (CT), according to Lab researchers.
Described in a paper in the Nature publication npj Advanced Manufacturing, the system combines cameras mounted on a 3D printer with ML-based image segmentation and computer vision tools to convert thousands of images captured during printing into detailed measurements and spatial maps of the deposited material.
"We now have kind of a brain behind the eyes," said the project's technical lead Brian Weston, an engineer and AI/ML lead for digital twins at LLNL. "Our system can now see as we're printing, and we can make data-informed decisions going forward."
Catching printing problems earlier
The direct ink writing printing process can create complex, flexible cushions and pads whose mechanical performance depends on the dimensions and arrangement of strands that may be only a fraction of a millimeter thick. Small gaps, broken strands or changes in filament diameter can affect how a finished part performs.
Traditionally, researchers must complete the print, remove the part from the machine and inspect it using X-ray imaging, mechanical testing or other offline methods. Those inspections can be expensive and time-consuming and may only reveal that a part is unlikely to meet its requirements after manufacturing is complete.
The LLNL system provides an earlier screening step. A camera captures images as each layer is deposited, while software identifies the newest printed strands and calculates measurements such as filament diameter.
"It's a first-pass check," Weston said. "It allows us to see things before we do some very expensive tests and to fail parts earlier if we already know they have broken strands or other problems."
Principal investigator Brian Giera, LLNL associate program director for Data Science, AI and Manufacturing, said the significance of the work extends well beyond direct ink writing. The approach was developed to be adaptable to other AM technologies, conventional subtractive manufacturing and experimental systems used at the Lab.
"On-machine inspection will be a huge unlock for decreasing costs, increasing throughput and providing more information on the things we build," Giera said. "It's achieving a holy grail capability in the field and was done so in a way to spread to other important areas."
In the near term, Giera said the technology can act as a gatekeeper for more expensive inspection. A part with enough defects could be scrapped before printing is complete, saving time and material, while other results could help determine when more costly post-build methods such as X-ray CT are warranted.
As described in the paper, the team trained an ML image segmentation model using a curated dataset of nearly 15,000 human-annotated images representing several lattice geometries. A computer vision algorithm then used the model's results to trace printed strands and measure their diameter. In tests involving 55 parts, the automated measurements were typically within a few micrometers of human-derived measurements.
Manually measuring a large image could take a person from about 20 minutes to an hour, according to the team. The automated pipeline can perform the analysis in milliseconds, or roughly 100,000 times faster on average than a human can.
Building the capability required mounting and calibrating cameras, conducting extensive printing and imaging campaigns, creating the large annotated dataset and validating the resulting models. Weston said that initial investment now provides a reusable starting point that can be adapted to new cameras and parts with far less additional training data.

Seeing the whole print
To demonstrate the system at scale, the researchers applied it to a cushion with a designed footprint of approximately 25 by 25 centimeters They collected about 2,500 images from one layer and combined the measurements into a spatial map of the part's interior.
The map showed filament diameters gradually changing from one side of the print to the other. The pattern pointed to a slight tilt in the printing platform relative to the nozzle, a hardware problem that could have been hidden by an average measurement across the entire part.
The demonstration highlights an advantage of on-machine inspection, researchers said. While X-ray CT can provide detailed three-dimensional information, the size of an object that can be examined at high resolution is limited. A camera mounted on the printer can inspect parts whose dimensions exceed practical CT coverage.
The work addresses a vital prerequisite for greater manufacturing autonomy, according to Giera. An autonomous system "could not function properly without reliable measurement and inspection techniques," he said. "Our work represents foundational elements upon which autonomous manufacturing systems could be built."
The research was funded by a Laboratory Directed Research and Development Strategic Initiative led by Giera that ended in 2025. Additional co-authors included LLNL scientists and engineers Michael Zelinski, Hamed Ziad Ammar, Aldair Gongora, Brian Au, Robert Cerda, Josh DeOtte and William Smith.
The project's immediate goal is to identify defective parts earlier, but researchers ultimately envision a system that can go further. Weston said the capability is expected to be transferred to the Kansas City National Security Complex for evaluation on production-relevant systems and components.
Longer term, Weston said the inspection data could feed simulations and digital twins linking a part's measured structure to its predicted performance, potentially accelerating part acceptance and qualification beyond simply detecting defects after the fact.
"When the printer can inspect its own work, we can start thinking about the system making its own accept/reject calls," Weston said. "If it sees a defect, maybe it can assess whether that makes the part nonconforming."