Vigil AI Detection
Vigil is O.D.I.N.'s built-in AI print failure detection system. It analyzes camera frames in real time using on-device ONNX inference to detect print issues before they waste filament or damage your printer.
What It Detects
| Detection Type | Description |
|---|---|
| Spaghetti | Extruded filament not adhering to the model, producing tangled strands |
| Detachment | Print separating from the build plate mid-print |
| First-Layer Issues | Poor first layer adhesion, warping, or inconsistent extrusion |
| Build Plate Empty | Nothing detected on the build plate when a print should be present |
How It Works
Camera → go2rtc → Frame Capture → ONNX Model → Detection → Action
- go2rtc streams video from your cameras (RTSP, USB, or Bambu built-in cameras)
- Vigil captures frames from the go2rtc stream at regular intervals
- Each frame is passed through an ONNX object detection model running locally
- If the model detects an issue, a confirmation buffer validates the detection
- On confirmed detection, Vigil triggers the configured action (alert, auto-pause, or both)
All inference runs locally on the O.D.I.N. host. No frames or data are sent to external services.
Setup
Prerequisites
- At least one camera configured in go2rtc and streaming
- The camera must have a clear, stable view of the print bed
- The printer must be linked to a camera in Settings > Printers > [Printer] > Camera
Enabling Detection
- Navigate to Settings > Vigil AI
- Enable detection for each printer that has a camera assigned
- Detection starts automatically when the printer begins a print job
Vigil runs per-printer in its own thread. Enabling detection on many printers simultaneously increases CPU usage. On low-powered hosts, consider enabling detection only on printers running unattended or high-value prints.
Threshold Tuning
Each detection type has an independent sensitivity slider (0-100):
- Higher sensitivity — Catches more issues but may produce more false positives
- Lower sensitivity — Fewer false alarms but may miss subtle failures
Recommended starting points:
| Detection Type | Default | Notes |
|---|---|---|
| Spaghetti | 70 | Reliable. Lower if you get false positives from support structures. |
| Detachment | 60 | Can false-trigger on raft edges. Lower if using rafts frequently. |
| First-Layer | 50 | Highly dependent on camera angle and lighting. Tune carefully. |
| Build Plate Empty | 80 | Very reliable. Only lower if transparent filaments cause issues. |
Adjust thresholds under Settings > Vigil AI > [Printer] > Thresholds.
Confirmation Buffer
To avoid false positives, Vigil requires multiple consecutive detections before confirming an issue. A single frame showing a potential problem is not enough to trigger an action.
The confirmation buffer ensures:
- Transient anomalies (lighting changes, camera vibration) are ignored
- Only sustained, consistent detections trigger alerts or pauses
- You can adjust the buffer length per detection type for more or less conservative behavior
Auto-Pause
When enabled, Vigil automatically pauses the print on a confirmed detection. This prevents wasted filament and potential printer damage.
Auto-pause behavior:
- The pause command is sent immediately to the printer via its native protocol
- An alert notification is dispatched to all configured channels
- The detection frame is saved for review in the Detections page
- The print remains paused until a user manually resumes or cancels it
Auto-pause sends a pause command through the printer's protocol (MQTT for Bambu, REST for Moonraker/PrusaLink, SDCP for Elegoo). If the printer's communication is interrupted, the pause may not reach the printer. Auto-pause is not a substitute for physical safety measures like smoke detectors and thermal cutoffs.
Enable auto-pause for unattended prints. For attended prints, you may prefer alert-only mode so you can visually confirm before deciding to pause.
Detection History
All detections (confirmed and unconfirmed) are logged and viewable at Detections in the sidebar. Each entry includes:
- Timestamp
- Printer and detection type
- Confidence score
- Captured frame image
- Whether auto-pause was triggered
Frames are stored at /data/vision_frames/{printer_id}/ inside the container.
Vision Models
ONNX models are stored at /data/vision_models/ inside the container. Default models are copied from the image on first boot.
To use a custom or updated model:
- Place the
.onnxfile in/data/vision_models/ - Register it via Settings > Vigil AI > Models
- Assign it to printers as needed
Custom models must follow the same input/output tensor format as the default models. Incompatible models will fail silently or produce inaccurate detections. Test thoroughly before deploying custom models to production printers.