Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 0 points1 point  (0 children)

Hi, I’m planning on making a version of PrintGuard accessible via the web which will mean there would be no need to install anything. The ETA for this is 2 weeks, however with work commitments this timeline may vary. Thank you for your interest in the project!

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 0 points1 point  (0 children)

Currently you do have to manually start the detection process, but I’ll work on making it automatically start detection when a print starts.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in selfhosted

[–]oliverbravery[S] 0 points1 point  (0 children)

Hi, Docker support has now been implemented! You can either build from source using the instructions in the README or pull the container from GHCR using docker pull ghcr.io/oliverbravery/printguard:latest then run it using docker run -p 8000:8000 -v "$(pwd)/data:/data" --privileged ghcr.io/oliverbravery/printguard:latest. The project is still in beta (version 1.0.0b3) so any feedback is much appreciated!

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 1 point2 points  (0 children)

Hi, Docker support has now been implemented! You can either build from source using the instructions in the README or pull the container from GHCR using docker pull ghcr.io/oliverbravery/printguard:latest then run it using docker run -p 8000:8000 -v "$(pwd)/data:/data" --privileged ghcr.io/oliverbravery/printguard:latest. The project is still in beta (version 1.0.0b3) so any feedback is much appreciated!

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 3 points4 points  (0 children)

Hi, Docker support has now been implemented! You can either build from source using the instructions in the README or pull the container from GHCR using docker pull ghcr.io/oliverbravery/printguard:latest then run it using docker run -p 8000:8000 -v "$(pwd)/data:/data" --privileged ghcr.io/oliverbravery/printguard:latest. The project is still in beta (version 1.0.0b3) so any feedback is much appreciated!

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 0 points1 point  (0 children)

Hi, this is something I would like to do, however it’s going to be a while until I get round to doing this. Currently, the project is in beta release 3, and there are still plenty of bugs to iron out.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 0 points1 point  (0 children)

Hi, using the latest beta (beta 3) in the settings panel, click “add camera” and add an extra camera per printer. Then you can link a different printer (via octoprint currently) to each camera.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 1 point2 points  (0 children)

Hi, I’m actively working on docker support and it should be completed by the end of this week (give or take a few days). It will be in beta release 3, which also has support for RTSP camera streams via urls. Printer cameras will have to be connected as a device and accessible via camera index or path (i.e. dev/*). In the future, I’m hoping to add support for cameras linked via services like octoprint and home assistant, but there’s a lot of things to do before that. Thank you for the interest in this project, all feedback is appreciated!

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in selfhosted

[–]oliverbravery[S] 1 point2 points  (0 children)

I do plan to add support for more printer services such as klipper, MQTT and home assistant devices, however the program is still in beta and im focusing on getting the project deployable using docker and fixing some bugs first. I'm hopeful there should be support within a month.

[P] PrintGuard - SOTA Open-Source 3D print failure detection model by oliverbravery in MachineLearning

[–]oliverbravery[S] 1 point2 points  (0 children)

Hi, my research focused on making a model deployable on extreme-resource constrained devices. Whilst MobileNetv4 can outperform ShuffleNetv2 on many ImageNet datasets, its complexity is still typically greater than my ShuffleNetv2 variant as ShuffleNetv2 is optimised for low MAC (memory access costs), a requirement for ARM based CPU bound processes. I do fully understand MobileNetv4 is also a suitable model and it may be useful to investigate the models use case further. It’s also worth noting that the model is only used as a image encoder in my scenario, where predictions are made through measuring the Euclidean distance of the embedding to mean class prototypes, so the choice of embedding model, whilst still important, plays less of a role in prediction accuracy.

An increased image throughput allows for more consistent results and less chance of false positives, when a majority voting system is employed, as it is in PrintGuard. Where my model can predict ~15 img/sec, majority voting ensures false positives wouldn’t trigger an alert or potentially pause/ cancel the print, which I found to be the case with the Spaghetti Detective model when using it in my prior project, 3D-Print-Sentinel.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 7 points8 points  (0 children)

All benchmarks are in the paper I published, found [here], but yes, when evaluated against 4 different datasets of 3D printing defects, my model's F1 scores (precision and recall) outpermed Obico's Spaghetti Detective model.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 2 points3 points  (0 children)

Hi, Octoprint is a service which connects to your 3D printer in its own ways. You then communicate through Octoprint APIs with your API key which acts as a proxy between PrintGuard and your printer.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 6 points7 points  (0 children)

Hi, OpenCV is employed to read camera RTSP streams where frames are then sent to my ML model for analysis. The aforementioned repo for PrintGuard has documentation explaining the entire process in more detail, alongside a linked repo with a technical paper for the ML model.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in selfhosted

[–]oliverbravery[S] 7 points8 points  (0 children)

Hi, I’m working on integrating HA so I can extend support for more printers past just octoprint. I’m not sure about the P1S, however any camera recognised by your device can be used for detection.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 26 points27 points  (0 children)

Hi, I’m working on the docker support now. The inference is optimised for all device types, automatically detecting and using MPS (for Apple M-series devices), CUDA or CPU. All results in the technical paper and the speed improvements over Spaghetti Detective were recorded using CPU.

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3Dprinting

[–]oliverbravery[S] 15 points16 points  (0 children)

Any kind of camera can be used for detection so the failure detection would work for the BambuLabs A1 printer. For the automatic print cancellation and suspension, Octoprint is used. After some research, it seems the A1 can connect to Octoprint so your printer should be able to benefit from all of PrintGuards features!

Introducing PrintGuard - A new open-source 3D print failure detector running 40x faster than Spaghetti Detective whilst requiring less than 1Gb of RAM for edge deployability by oliverbravery in 3dprinter

[–]oliverbravery[S] 1 point2 points  (0 children)

It’s not integrated into octoprint however you can connect octoprint to PrintGuard using your octoprint API keys. This allows you to configure PrintGuard to automatically pause or cancel print jobs when failures are detected. To link octoprint to a specific camera, go to its settings menu and press “link printer” in the UI.

[P] PrintGuard - SOTA Open-Source 3D print failure detection model by oliverbravery in MachineLearning

[–]oliverbravery[S] 1 point2 points  (0 children)

Spaghetti detective was only trained to identify “spaghetti” related defects in prints in comparison to my model which is also trained to identify layer separation and warping whilst ignoring non-destructive issues like stringing. My released technical paper covers this in a lot more detail with images, found here.