Open source

MTU’s Joshua Pearce develops open source, computer vision-based print correction algorithm

Two researchers from Michigan Technological University, Dr. Joshua Pearce and Aliaksei Petsiuk, have developed an open source, computer vision-based software algorithm capable of print failure detection and correction.

Leveraging just a single camera pointed at the build plate, the code tracks – layer by layer – any printing errors that appear on the exterior or interior of the printed part. It then has the ability to generate any printer actions it deems necessary to improve reliability and print success rates. The algorithm is FFF focused and is ultimately designed to save time and filament.

How does it work?

The approach is quite a clever one. A visual marker plate is placed on top of the print bed, pointing out exactly where the model will be printed before any extrusion has taken place. This has the effect of mapping out the digital coordinates of the STL file to the corresponding real world coordinates in the build chamber. A digital 3D copy of the model is generated in real space (similar to AR), which acts as a reference point for comparison purposes later on.

Projective transformation of STL model into real space. Image via MTU.
Projective transformation of STL model into real space. Image via MTU.

Once the printer is set up and ready to go, the comparison portion of the code kicks into gear. Each layer of the model, as it’s being printed, is compared to an analytical projective plane in the digital copy. This projective plane shifts according to the layer height and layer number, tracking the position of the nozzle each step of the way.

Using an extensive set of highly-numerical image processing techniques, the algorithm is able to segment meaningful contour and texture patches based on the images from the camera and the known parameters of the STL file. Any artifacts that appear, both on the shell and the infill, are pointed out and the relevant print parameters are automatically amended. Once the print is finished, the user is given a layered set of images taken throughout the printing process. This makes further volumetric analysis possible for future runs.

The layer analysis process. Image via MTU.
The layer analysis process. Image via MTU.

Initial testing on a delta RepRap 3D printer with PLA filament has garnered some promising results, although the work is still in its early stages. The algorithm is able to consistently detect failures caused by under- or over-extrusions but the failure correction mechanisms still need to be refined. The researchers, as it stands, see the work as an intelligent print suspension tool but expect to scale up to a full failure correction algorithm in the near future.

Further details of the algorithm and how it works can be found in the paper titled ‘Open source computer vision-based layer-wise 3D printing analysis’. It is co-authored by Joshua Pearce and Aliaksei Petsiuk. Readers interested in accessing the open-source code can do so here.

The algorithm detecting regions of abnormal texture. Image via MTU.
The algorithm detecting regions of abnormal texture. Image via MTU.

AI in 3D printing

Computer vision is just one sub-section of artificial intelligence, a vast field that has wormed its way into 3D printing in the last few years. Just last month, AI specialist PrintSyst.ai launched its new proprietary AI engine specifically for the 3D printing process – the 3DP AI-Perfecter. It is a pre-printing evaluation tool designed to help aerospace, defense, and automotive professionals increase their print success rates with ever-improving ML algorithms.

Earlier, in April, software engineer Kenneth Jiang released his own take on an open-source print failure detection tool, cleverly named the Spaghetti Detective. The AI software utilizes the webcam of a printer or home computer to detect when a print job has gone wrong and started extruding into thin air, generating what many refer to as ‘spaghetti’. The Detective interrupts the process and alerts the user through an email or text message.

Subscribe to the 3D Printing Industry newsletter for the latest news in additive manufacturing. You can also stay connected by following us on Twitter and liking us on Facebook.

Looking for a career in additive manufacturing? Visit 3D Printing Jobs for a selection of roles in the industry.

Featured image shows The algorithm detecting regions of abnormal texture. Image via MTU.