The Spaghetti Detective AI

3D printing can be stressful – let’s find out if The Spaghetti Detective can let you sleep a bit easier!

“Do not leave your 3D printer” unattended. Sure, that’s good practice, especially with ones that have, you know, questionable cable management or cheap components, but are you really going to babysit the machine the entire time? I don’t think so. Especially when things like noise, particle emissions, and printing smells are something you don’t really want to have right next to you. So OctoPrint is actually a very good first step for that – it allows you to remote-control a 3D printer from anywhere you have access to the same network your printer’s Raspberry Pi is on. But you still have to actively watch the webcam stream and you can’t leave the house or you’re going to lose the connection. So that’s where the Spaghetti Detective comes in, and it promises to solve both those problems. It’s a web service that you can use to check in on your prints from anywhere around the world and tweak or stop things if you need to, but it’s also an AI that watches that webcam feed for you and will either just alert you or actually halt the print if thinks there’s something going seriously wrong. So let’s see how good an AI can be at detecting print failures and how useful the Spaghetti Detective really is.


Set Up

The Spaghetti Detective, is, thankfully, really easy to set up. It’s two components, one is the “cloud” web service, which also does the AI image processing, and you can either use the one that the folks from the Spaghetti Detective are providing or set up your own server if you want to. It’s open-source software, after all. And the other component is an OctoPrint plugin, which basically just remote-controls OctoPrint itself, which I think is awesome because, first of all, why reinvent the wheel and create a whole other printer server when there’s already a perfect solution available in the form of OctoPrint, but second of all, you then also get a fully-featured OctoPrint server that, of course, is fully functional for printer control, file management, etc on your local network.

The setup is super quick if you already have OctoPrint running, you create an account on the Spaghetti Detective website, install the plugin into OctoPrint, and then you just copy-paste a secret key from the website to the plugin and that’s it! If you want to start a print, you can either use the OctoPrint interface and do it the “normal” way and the Spaghetti Detective will pick up that your printer is now printing something, or, on the paid plans, you can also upload and start prints through the web interface. And after that, just choose if you want the Spaghetti Detective to stream and watch the print and whether it should pause or just alert you if it thinks something’s wrong, and that’s it!


Free and Paid Plans

So I guess we should briefly talk about the free and paid options. Like I said, the Spaghetti Detective is an open-source project, so, if you want to, you can use all the features without spending a single penny. But that’s going to entail setting up your own server, maintaining that as well as making sure that’s securely available on the internet if you want to access it remotely. Also, apparently, the actual processing that’s happening with the print failure detection AI is a bit intense and too much for the little Raspberry Pi that’s already trying to keep up with consistently feeding data to the printer. So if you don’t want to manage your own server, the Spaghetti Detective offers a few different convenient paid tiers that give you access to more features as you go.

There is a free tier, which lets you remote-control the printer and gives you a low-framerate webcam stream as well as 10 hours per month of the AI watching your prints and intervening if you want it to. You can actually earn more watch hours by for example giving feedback on your prints. The free tier lets you use the remote control and webcam feature as much as you want, which I think is pretty awesome, but for the compute-intensive AI watching feature, there is a limit. Uploading or starting a print through The Spaghetti Detective is limited to the paid tiers, and those also include a higher framerate live webcam stream as well as a larger allowance of AI watch hours.

To me, just getting the peace of mind of being able to check in on your prints if you decide to leave your printer while you go out and being able to actually intervene and stop the print if you need to is already a huge deal, and you actually get that in the free plan already, but for the AI features, whether paying for them is worth it really depends on whether they actually work. So I’ve done some testing. I’ve actually combined this with my testing for the Artillery X1 review, so you’re going to see that printer as my guinea pig in all these time-lapses.


First Test Print

So for the print failure detection AI, it really needs to do two things for it to be useful, and that’s that it should correctly detect prints that are ok as “ok”, so no false-positive alerts, because if you have The Spaghetti Detective set to pause whenever it senses an issue, that would cause more harm than it solves when it pauses too often; but of course, also, it needs to be able to correctly identify issues when they do happen and take action, so, no false negatives.

And just to get my bearings, I started with the Strata Miniatures Rogue that you also saw in the last video, this time scaled to 300% and sliced with the Slic3r slicer that Artillery supply for their X1. And this one lit up like a Christmas tree. So, The Spaghetti Detective highlights the areas that it thinks are failing, and that was pretty interesting to see, because, yes, the auto-generated supports by Slic3r are not that great, well, they’re actually pretty bad, and those did topple over and cause some spaghetti, which, as far as I can tell, was correctly detected, but it also detected issues on just random high-detail areas or just glossy top surfaces that were actually fine.

Honestly, I would rather have it detect too much and alert me one too many times than just overlook an is sue and waste filament or even damage the printer by not intervening.


Printing Benchies with added Issues

So, ok, there was a lot going on in that print, at this point I’m thinking it’s maybe a bit too sensitive, which would be fine, so let’s step it down a notch and just print Benchies. Like, if this neural network was trained on anything, it better know what a 3D Benchy should look like. I printed two good ones, with no issues added, and those correctly detected as being flawless.

So far, so good, so next I tried some that actually had issues. For example, a Benchy that’s extruded with a 30% extrusion multiplier, so it’s only getting 1/3rd of the filament the print would actually need to print well.

And according to The Spaghetti Detective, this is perfectly fine, too. Honestly, I am surprised by how well this is coming out, but the holes in the surface were clearly visible even in the low-resolution webcam feed. Okay, so maybe it was the contrasty lighting that threw it off, so I added more lights, but that also didn’t change anything. According to The Spaghetti Detective, this is still a perfectly fine print.

Okay, so maybe a layer shift would get it excited, so I prepared a gcode that intentionally shifts the Y axis at 10mm print height, starting with a 5mm offset, which, actually, wasn’t that much of an issue for the printer, and The Spaghetti Detective also did not detect it; next 10mm, which has some visible spaghettitization going one, also, nothing detected, so I upped that to 25mm, which basically takes the entire upper half of the Benchy and throws it aboard, and, finally, that was detected as maybe being a bit of a problem.


Trying to improve Error Detection

Now, of course, there are some technical limitations that play into how well the software is going to be able to recognize what’s going on. The biggest limitation, obviously, is the camera, and not this specific camera, this is a 1080p one that’s actually quite decent, but the fact that it is a camera. It’s only ever in one spot, it doesn’t see in stereo as we do, and when you try to get the whole print bed into frame, details that would determine whether a print is failing or successful do become pretty small and hard to pick up. And there’s a lot of motion blur when the print bed moves while the camera is grabbing a frame. There’s also the issue of lighting – you want everything to be evenly lit, but not so evenly that you stop seeing any sort of detail.

So, much of my testing my focus on trying to see whether I could improve the error detection rate by giving The Spaghetti Detective better data. I added lighting from the direction the camera is looking in, I mounted the camera to the print bed so that there wouldn’t be any motion blur and I increased the resolution OctoPrint is getting from the camera from the default 640×480 pixels to 1280×720 – aka. 720p.

And none of all this seemed to make a difference. With my human eyes, I could basically see every failure happening on the camera feed – which is the same feed The Spaghetti Detective is looking at, but even under what I would consider best-case scenarios, the AI was barely ever recognizing that there was anything wrong.

Now, that’s not to say that it never works, it picked up some of the more severe failures and the Spaghetti Detective website does showcase a few failing prints that are correctly identified, but it always seems to be at a point where it’s already pretty far gone. At that point, you’re really just protecting the printer from damaging itself.


Useful or not?

But what I’ve asked myself while using The Spaghetti Detective is, you know, even if it was 100% accurate and reliable, what are you going to do with that information that your print is failing? You’re not going to save the print, all you can do is to stop and start over, this time hopefully having fixed what was causing the problem, but it’s really just reacting to something that has already happened. Best case, vs. checking on your printer every two hours or so through OctoPrint, would be saving a couple grams of filament, getting to restart the print a bit faster and possibly less cleanup on the printer.

Sure, it could be a nice, extra safety net if you’re printing overnight or simply don’t want to check the print that often, but with how unreliable the detection has been for me so far, I really don’t know if I’d be sleeping any better. The AI really still needs a lot of improvement and more training. 

But three features that do make The Spaghetti Detective quite useful already – and you actually get those, currently, on the free plan.

They are, like I mentioned, being able to watch the print from anywhere, then, since you’re already sending a livestream of your print to The Spaghetti Detective, you can re-watch all your past prints and download a timelapse from the webcam’s perspective, which is neat, but that’s also built into OctoPrint now, and lastly, they are experimenting with offering an OctoPrint tunnel, which would allow you to securely access the full OctoPrint interface from basically anywhere, but it’s still in beta and managed to completely crash my OctoPrint 8 hours into a two-day print the first time I tried it. So, maybe use that feature sparingly until it’s fully tested and released.

Now, for the paid options… well, there is a one-month free trial where you can use all the features without any limits, and you should definitely use that to check if The Spaghetti Detective can detect the sort of issues you’re expecting and whether that extra information is useful for you. I will mostly be using it for remote webcam viewing.

The Spaghetti Detective

Raspberry Pi Setup: Raspberry Pi 4

32GB microSD card

USB cable

Power supply

Webcam

🎥 All my video gear https://toms3d.org/my-gear Music by Epidemic Sound http://share.epidemicsound.com/MadeWithLayers

All my video gear

💙 Enjoying the videos? Support my work on Patreon!

Product links are affiliate links – I may earn a commission on qualifying purchases (at no extra cost to you)


Check out my second channel “More Layers” on YouTube for livestreams


You can support me without spending a single penny!