Files
continuum-ai-worker/README.md
T

37 lines
1.3 KiB
Markdown

# continuum-ai-worker
Computer-vision failure detection worker for the Continuum print farm
platform. Consumes camera frame batches pushed onto the Redis Stream
`stream:camera_frames` (by `continuum-backend`'s `src/queue/`), runs them
through an ONNX Runtime model, and fast-paths high-confidence failure alerts
back to Redis and Postgres.
## Pipeline
```
continuum-proxy --(frames)--> continuum-backend --(XADD)--> stream:camera_frames
|
XREADGROUP (this worker)
v
src/inference (ort session)
v
src/reporter (Redis pub/sub + Postgres INSERT)
```
## Structure
```
src/
main.rs Consumer-group loop: XREADGROUP -> decode -> infer -> report -> XACK
inference/ Thread-safe ONNX Runtime session wrapper + pre/post-processing
reporter/ Alert fan-out: Redis pub/sub for realtime UI, Postgres for audit trail
```
## Getting started
```bash
cp .env.example .env
# place an ONNX failure-detection model at ./models/failure-detector.onnx
cargo run
```