oliverbravery/PrintGuard
Catches failed 3D prints on your own hardware, pauses the printer and sends you a snapshot alert. Runs in Docker, or as a macOS or Windows app. Free and open source, and no frame ever leaves your network.
What it is
PrintGuard is a self-hosted AI system that watches your 3D printer through a camera and automatically catches failed prints. When it spots a defect (like the classic "spaghetti" mess of extruded plastic), it pauses or cancels the print and sends a snapshot alert to your phone — all running on your own hardware, with no cloud service or subscription.
How it works
The core is a compact vision model (a ShuffleNetV2 encoder, about 5 MB) that scores every camera frame for signs of a failed print. It runs locally on your CPU, GPU, or NPU — a Raspberry Pi 4 can handle one or two cameras. The model is shared across as many cameras as your hardware can sustain, and it only watches while a linked printer is actually printing.
When a defect persists long enough (you can tune how many consecutive flagged frames trigger action), PrintGuard:
- Acts — pauses or cancels the print through OctoPrint, Klipper, Elegoo, Prusa, or Bambu Lab (via their local APIs, never their clouds)
- Alerts — pushes a snapshot to ntfy, Pushover, Telegram, or Discord
Key features
- Dashboard — live risk scores per camera, temperatures, progress, one-tap preheat, and a library of sliced files you can preview in 3D before sending to a printer
- Tuning — per-monitor alert thresholds, hold time, cooldown, and response (alert/pause/cancel), backed by a history of risk scores and snapshots of every alert
- Automation — appears in Home Assistant via MQTT, plus a REST API and an MCP server for agents/scripts, with scoped access tokens
- Plugins — sandboxed JavaScript plugins from an in-app store (picture-in-picture, alert sounds, progress reports, Spotify integration)
- Themes — light, dark, and glass themes with a theme editor
Performance claims
The README compares PrintGuard against Obico's Spaghetti Detective (the only other open model) on a Raspberry Pi 4B across four unseen test sets: 93.6% accuracy vs 53.8%, F1 0.937 vs 0.411, and 15.1 images/second vs 0.35 — roughly 43x the throughput. Method and results are in a linked dissertation.
Deployment
- Desktop apps for macOS (Apple silicon) and Windows — a menu-bar/tray hub that keeps watching even when the window is closed
- Docker single container for always-on servers or NAS, with images for amd64 and arm64 (including Raspberry Pi 4/5)
- Hardware acceleration — carries both LiteRT and ONNX Runtime models, benchmarks both at startup, and uses the best provider available (Core ML on macOS, Windows ML, OpenVINO on Intel, TensorRT on NVIDIA)
Notable caveats
- No built-in authentication — the README explicitly warns never to port-forward it; you're expected to put an identity layer (Tailscale, Cloudflare Tunnel with Access, oauth2-proxy) in front
- The Windows build is unsigned (requires "Run anyway" on first launch)
- Optional: you can send labeled frames to help train the model further
Bottom line
A genuine, substantial AI/ML project: real-time computer-vision defect detection for 3D printing, fully local and private, with a polished dashboard, broad printer/camera/alert integrations, and credible performance numbers against the main open competitor.
Related
- Project
- Project
- Dispatch
- Dispatch
- Project