PrintGuard - Real-time Defect Detection on Edge-devices
Project description
PrintGuard - Local 3D Printing Failure Detection and Monitoring
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.
Features
- 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.
- 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.
Table of Contents
Installation
PyPI Installation
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 printguard
To start the web interface, run:
printguard
Docker Installation
PrintGuard is also available as a Docker image, which can be pulled from GitHub Container Registry (GHCR):
docker pull ghcr.io/oliverbravery/printguard:latest
Alternatively, you can build the Docker image from the source:
docker build -t printguard .
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:
docker run -p 8000:8000 -v printguard_data:/data -e PRINTGUARD_SECRET_KEY='your-super-secret-key' printguard
Initial Configuration
After 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.
Usage
| The main interface of PrintGuard. All cameras are selectable in the bottom left camera list. The live camera view displayed in the top right shows the feed of the currently selected camera. The current detection status, total detections and frame rate are displayed in the bottom right alongside a button to toggle live detection for the selected camera on or off. | |
| The camera settings page is accessible via the settings button in the bottom right of the main interface. It allows you to configure camera settings, including camera brightness and contrast, detection thresholds, link a printer to the camera via services such as Octoprint, and configure alert and notification settings for that camera. You can also opt into web push notifications for real-time alerts here. | |
| Accessible via the configure setup button in the settings menu, the setup page allows configuration of camera feed streaming settings such as resolution and frame rate, as well as polling intervals and detection rates. | |
| When a failure is detected a notification is dispatched to subscribed devices via web push notifications, allowing users to get real-time alerts and updates about their print. On the web interface, an alert modal appears showing a snapshot of the failure and buttons to dismiss the alert or suspend/cancel the print job. If the alert is not addressed within the customisable countdown time, the printer will automatically be suspended, cancelled or resumed based on user settings. | |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file printguard-1.0.0b2.tar.gz.
File metadata
- Download URL: printguard-1.0.0b2.tar.gz
- Upload date:
- Size: 4.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d984e6ef9185a3343d756fa420f1953b660f4985af9da9b822ee8fb4e8c355c
|
|
| MD5 |
8bc2097e166710a604216fd640810b74
|
|
| BLAKE2b-256 |
28b6beadd6b16720613030ed0d7f6ced47a8a13bcd6b55114b3cecbf33cb6445
|
Provenance
The following attestation bundles were made for printguard-1.0.0b2.tar.gz:
Publisher:
python-publish.yml on oliverbravery/PrintGuard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
printguard-1.0.0b2.tar.gz -
Subject digest:
6d984e6ef9185a3343d756fa420f1953b660f4985af9da9b822ee8fb4e8c355c - Sigstore transparency entry: 270731780
- Sigstore integration time:
-
Permalink:
oliverbravery/PrintGuard@d5b7c30ced4f26953a1c9151523b99daf0d2393c -
Branch / Tag:
refs/tags/v1.0.0b2 - Owner: https://github.com/oliverbravery
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d5b7c30ced4f26953a1c9151523b99daf0d2393c -
Trigger Event:
release
-
Statement type:
File details
Details for the file printguard-1.0.0b2-py3-none-any.whl.
File metadata
- Download URL: printguard-1.0.0b2-py3-none-any.whl
- Upload date:
- Size: 4.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c6be3b1e51317b582e7462501954c09ef549ffd0870d9f1e1b967f1426c4a62
|
|
| MD5 |
592cb9663261ae0765cc85cdf21bea67
|
|
| BLAKE2b-256 |
9141a4a847cca5b4ff2acdd9179979f3115eafc8edb23c323d4ef976e724f005
|
Provenance
The following attestation bundles were made for printguard-1.0.0b2-py3-none-any.whl:
Publisher:
python-publish.yml on oliverbravery/PrintGuard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
printguard-1.0.0b2-py3-none-any.whl -
Subject digest:
2c6be3b1e51317b582e7462501954c09ef549ffd0870d9f1e1b967f1426c4a62 - Sigstore transparency entry: 270731781
- Sigstore integration time:
-
Permalink:
oliverbravery/PrintGuard@d5b7c30ced4f26953a1c9151523b99daf0d2393c -
Branch / Tag:
refs/tags/v1.0.0b2 - Owner: https://github.com/oliverbravery
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d5b7c30ced4f26953a1c9151523b99daf0d2393c -
Trigger Event:
release
-
Statement type: