Researchers at Lawrence Livermore National Laboratory have built a camera-based system that inspects 3D-printed parts layer by layer during the print, using machine learning to measure each deposited strand and flag defects before the part comes off the machine. The work, published in npj Advanced Manufacturing, targets direct ink writing, an additive process that extrudes soft or paste-like material through a nozzle in thin strands whose diameter and spacing determine how the finished part performs.

The usual way to check these parts is to finish the print, take it off the machine, and inspect it with X-ray CT or mechanical testing. Those methods are slow and expensive, and they often only confirm a part is out of spec after it is already built. The Livermore system adds an earlier screening step: a camera images each layer as it goes down, and software identifies the newest strands and measures features such as filament diameter on the spot. "It's a first-pass check," said technical lead Brian Weston. "It allows us to fail parts earlier if we already know they have broken strands or other problems."

The measurement numbers are the substance. The team trained an image-segmentation model on nearly 15,000 hand-annotated images covering several lattice geometries, then used a computer-vision algorithm to trace strands and measure their diameter. Across 55 test parts, the automated measurements landed within a few micrometers of human ones. A person needs 20 minutes to an hour to measure a large image by hand; the automated pipeline does it in milliseconds, roughly 100,000 times faster on average.

Scanning the whole print, rather than sampling it, is what turns the measurements into a diagnostic. On a cushion about 25 by 25 centimeters, the team stitched roughly 2,500 images from a single layer into a map of the part's interior and saw filament diameter drift steadily from one side to the other. That pattern revealed a slight tilt in the print platform relative to the nozzle, a hardware fault an averaged measurement across the part would have hidden. It also points to a limit of X-ray CT, which gives detailed 3D data but only over a volume small enough that a large part exceeds its practical resolution.

The near-term use is a gatekeeper for costlier inspection: scrap a part with enough defects before the print finishes, and use the layer data to decide when full X-ray CT is worth running. Longer term, the group frames on-machine measurement as a prerequisite for autonomous manufacturing, since a system cannot make its own accept or reject calls without reliable inspection. Weston said the capability is expected to transfer to the Kansas City National Security Complex for evaluation on production systems, and that the layer data could eventually feed digital twins that link a part's measured structure to its predicted performance, moving the tool from defect detection toward part qualification.