Skip to content

Releases: tholterhus/pycentauri

v0.13.2 — status-alert context, persistent arming, interval knob

Choose a tag to compare

@tholterhus tholterhus released this 04 Oct 20:04

Operational polish around the live detection:

  • Configurable analysis cadence: DETECT_INTERVAL / --detect-interval
    (seconds between analyzed frames; the analysis adds no network traffic —
    the camera stream is the only real load, and it now runs only while a
    UI client is open or a print is being monitored).
  • Status alerts with context: pause/abort/finish Telegram messages
    append the job name and layer/progress; on a CC2 an empty filament
    sensor during a pause is reported as "(filament runout)"; raw firmware
    status codes land in the journal for future mapping.
  • Persistent arming: the armed response (notify/pause/stop) survives
    service restarts; DETECT_ACTION is the initial default.
  • Camera-state documentation: README explains exactly when the camera is
    on; detector alerts sharpened; docs got a plain-language pass.

v0.13.1 — Telegram push, panel cleanup, config cleanup

Choose a tag to compare

@tholterhus tholterhus released this 04 Oct 19:03

Dashboard and notification polish around the trained-model deployment:

  • Telegram push (optional): detections AND print-state changes
    (paused / filament switch / aborted / finished / error) as one-liners
    with a camera frame — TELEGRAM_TOKEN + TELEGRAM_CHAT_ID in
    /etc/pycentauri.conf.
  • Layer-aware training-frame collection: first layers densely, then
    evenly spread per layer change across the whole print.
  • Service config: env vars dropped the PYCENTAURI_ prefix
    (HOST, PORT, DETECT, TELEGRAM_TOKEN, ...) — existing configs
    need sed 's/PYCENTAURI_//g' (installer knobs unchanged).
  • DETECT panel: training-data UI moved out of the panel
    (POST /api/detect/collect); fork notice + upstream credit added to
    the README.
  • Edge-TPU-compiled v1 model ships in the v0.13.0 release assets.

v0.13.0 — spaghetti training pipeline + trained model

Choose a tag to compare

@tholterhus tholterhus released this 04 Oct 16:20

A ready-to-use failed-print model for the pycentauri detector.

Do you even need these files?

Probably not. The trained models are bundled with the package — a pip install from this repository or a plain git clone includes both the Coral and the CPU variant plus the labels, and DETECT_MODEL=auto (the default) finds them automatically. No manual download needed.

These assets exist for standalone use: if you install differently, want to copy the model to another machine, or inspect it.

Which files are which?

  • No Coral stick? You only need spaghetti.tflite (the CPU model — runs on any machine, ~200 ms per look) and spaghetti.txt (the label file, found automatically by its name). Point DETECT_MODEL at data/models/spaghetti.tflite.
  • Coral stick? Use spaghetti_edgetpu.tflite (the stick's AI chip does a look in ~5–15 ms) — and keep spaghetti.tflite next to it, so a machine without the stick still works.

Everything else is optional: spaghetti-float32.tflite (unquantized variant) and model-result.zip (the raw export bundle) only matter if you want to inspect or retrain.

Install (only if you don't use pip/git)

Copy the files you need into data/models/ in your pycentauri directory (a model there wins over the bundled one), then:

# in /etc/pycentauri.conf:
DETECT_MODEL=data/models/spaghetti_edgetpu.tflite   # Coral
# or: DETECT_MODEL=data/models/spaghetti.tflite     # CPU-only machine
# or simply: DETECT_MODEL=auto

# then verify:
centauri detect check
# → backend: edgetpu (Coral) or cpu, ~5-15 ms or ~200 ms per look

Details: README — Spaghetti detection · How the model was made and how to retrain: scripts/train/README.md

Where the model comes from (license attribution)

Trained on 7,295 images / 13,791 boxes:

  • "3D Printer Spaghetti Detection" dataset by training-l9tjj (Roboflow Universe) — Public Domain
  • "Spaghetti" dataset by aiot-innowork (Roboflow Universe) — CC BY 4.0 (modified: only the spaghetti class subset used)
  • Base architecture: SSD MobileNet V2 320×320, TensorFlow Object Detection API — Apache-2.0

It detects one failure mode: spaghetti (a print that has come loose and turned to stringy mess). It is a runaway-print alarm, not a quality inspector — warping/zits/layer shifts need the planned 4-class model.

After installing, run one print in notify mode (zero false alerts) before arming pause/stop in the dashboard.