Open source

Open source Spaghetti Detective AI software detects failed prints through webcam

With the majority of the world home-bound due to the COVID-19 outbreak, the open source community seems to be alive and kicking with its latest gift to 3D printing: an AI software that automatically pauses failed prints. The Spaghetti Detective (TSD) utilizes the webcam of a printer or home computer to detect when a print job has gone wrong and started extruding ‘spaghetti’, interrupting the process and alerting the user through an email or text message.

TSD can be downloaded for free if used on one 3D printer, checking the progress of a print once every ten seconds. If required, the user can opt to pay for a Pro service that watches over multiple 3D printers at once, also bringing the framerate up to 25 per second. The Pro service starts at $4 a month with additional printers (up to five) being added to the arsenal at $2 a pop.

Deep learning for 3D printing

According to Kenneth Jiang, the lead software engineer behind TSD, the AI is built on a deep learning algorithm by the name of YOLO. The TSD team initially boxed off patches of images where spaghetti had been extruded, effectively data labelling them. These images of failed prints were fed to the YOLO algorithm during its infancy, training it in print failure detection. After many cycles, the algorithm eventually learned to detect spaghetti in images by itself. It now displays boxes on images where it believes a failed print has occurred, stating its level of confidence.

YOLO's spaghetti detection certainty values. Image via TSD.
YOLO’s spaghetti detection certainty values. Image via TSD.

TSD has historically only had an inaccuracy rate of 6.9%, meaning it missed failures or flagged up false positives an average of 6.9 times every 100 prints. The TSD team is working hard to maintain an inaccuracy rate of only 2% in the coming months

Details of the deep learning algorithm and failure detection process can be found in a blogpost by Kenneth Jiang.

Collateral detection

In a recent reddit post on r/3Dprinting, an online community of 3D makers, one user shared their experience of TSD going above and beyond the call of duty, unintentionally detecting a failed print on a printer operating in the background of the webcam’s vision. The post just goes to show the potency of the AI, despite it still being a work in progress. With ongoing refinement on the project, the TSD team expects the software to graduate from just the hobbyist maker community and be adopted in an industrial setting. They believe it could be extremely useful to print farms and larger prototyping businesses, automating a portion of the workflow.

TSD detecting spaghetti on a 3D printer in the background. Image via reddit user Proteus3D.
TSD detecting spaghetti on a 3D printer in the background. Image via reddit user Proteus3D.

TSD is one of many open source contributions to the 3D printing community. For the last few years, makers have been benefiting from OctoPrint, a software platform that allows users to control and monitor print jobs remotely from their devices. UK-based 3D file marketplace MyMiniFactory has also previously launched a Click & Print plugin for use with the OctoPrint platform. The plugin starts a print job straight from an STL file based on predetermined print parameters, allowing novice users to skip the file preparation stage of the 3D printing process.

The nominations for the 2020 3D Printing Industry Awards are now open. Who do you think should make the shortlists for this year’s show? Have your say now. 

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 a failed Pikachu print surrounded by spaghetti. Photo via TSD.

No Newer Articles