PrintGuard offers local, real-time print failure detection for 3D printing on edge devices. A web interface enables users to monitor multiple printer-facing cameras, connect to printers through compatible services (i.e. Octoprint) and receive failure notifications when the computer vision fault detection model designed for local edge deployment detects an issue and automatically suspend or terminate the print job.
The machine learning model's training code and technical research paper can be found here.
- Web Interface: A user-friendly web interface to monitor print jobs and camera feeds.
- Live Print Failure Detection: Uses a custom computer vision model to detect print failures in real-time on edge devices.
- Multiple Inference Backends: Supports PyTorch & ONNX Runtime for optimized performance across different deployment scenarios.
- Notifications: Sends notifications subscribable on desktop and mobile devices via web push notifications to notify of detected print failures.
- Camera Integration: Supports multiple camera feeds and simultaneous failure detection.
- Printer Integration: Integrates with printers through services like Octoprint, allowing users to link cameras to specific printers for automatic print termination or suspension when a failure is detected.
- Local and Remote Access: Can be accessed locally or remotely via secure tunnels (e.g. ngrok, Cloudflare Tunnel) or within a local network utilising the setup page for easy configuration.
The project is currently in pre-release, so the
--preflag is required for installation.
PrintGuard is installable via pip. The following command will install the latest version:
pip install --pre printguardTo start the web interface, run:
printguardPrintGuard is also available as a Docker image, which can be pulled from GitHub Container Registry (GHCR):
docker pull ghcr.io/oliverbravery/printguard:latestAlternatively, you can build the Docker image from the source, specifying the platforms you want to build for:
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
-t oliverbravery/printguard:local \
--load \
.To run the Docker container, use the following command. Note that the container requires a volume for persistent data storage and an environment variable for the secret key. Use the --privileged flag to allow access to the host's camera devices.
To run the Docker container pulled from GHCR, use the following command:
docker run \
-p 8000:8000 \
-v "$(pwd)/data:/data" \
--privileged \
ghcr.io/oliverbravery/printguard:latestTo run the Docker container built from the source, use the following command:
docker run \
-p 8000:8000 \
-v "$(pwd)/data:/data" \
--privileged \
oliverbravery/printguard:localAfter installation, you will need to configure PrintGuard. First, visit the setup page at http://localhost:8000/setup. The setup page allows users to configure network access to the locally hosted site, including seamless options for exposing it via popular reverse proxies for a streamlined setup. All setups require you to choose to either automatically generate or import self-signed SSL certificates for secure access, alongside VAPID keys which are required for web push notifications.
Cloudflare - A secure way to expose your local web interface to the internet via reverse proxies, providing a reliable and secure connection without needing to open ports on your router. Cloudflare tunnels are free to use and offer a simple setup process however, a domain connected to your Cloudflare account is required. Restricted access to your PrintGuard site can be setup through Cloudflare Access, configurable in the setup page. During setup, your API key is used to create a tunnel to your local server and insert a DNS record for the tunnel, allowing you to access your PrintGuard instance via your custom domain or subdomain.
Ngrok - Reverse proxy tool which allows you to expose the local web interface to the internet for access outside of your local network, offering a secure tunnel to your local server with minimal configuration through both free and paid plans. The setup uses your ngrok API to create a tunnel to your local server and link it to your free static ngrok domain aquired during setup, allowing access to PrintGuard via a custom, static subdomain.
Local Network Access - If you prefer not to expose your web interface to the internet, you can configure PrintGuard to be accessible only within your local network.



