How twilliamsa7/hearth-watch works
Hearth is a resident-safety monitoring and care-response simulation platform. Camera or simulated observations enter the backend ingestion API, where the monitoring service tracks source health, detects incidents, and manages alerts and events for nurse and room interfaces. The edge runner performs local camera inference and submits observations; simulation and evaluation provide scenario playback and scoring against ground truth. The README documents these capabilities, while several implementation links below are based on source-index references rather than inspected excerpts.
Main entry points: app.py Ingestion API · service.py Monitor service · run_edge.py Edge runner · models.py Shared contract
Components 23
Edge sensing
- Edge runner
edge/run_edge.py - Pose capture
edge/hearth_edge/pose.py - Pose features
edge/hearth_edge/features.py - Backend client
edge/hearth_edge/client.py - Fall vision
backend/hearth/perception/fall_model.py
Monitoring service
- Shared contract
shared/python/hearth_schema/models.py - Ingestion API
backend/hearth/api/app.py - Monitor service
backend/hearth/monitor/service.py - Fall detector
backend/hearth/monitor/detector.py - Gesture rules
backend/hearth/monitor/gestures.py - Live state
backend/hearth/monitor/service.py
Simulation
- Scenario model
backend/hearth/sim/scenario.py - Simulation world
backend/hearth/sim/world.py - Live engine
backend/hearth/sim/live/engine.py - Scenario playback
backend/hearth/sim/controller.py
Evaluation
- Evaluation study
backend/hearth/eval/study.py - Batch evaluation
backend/hearth/eval/batch.py - Scoring
backend/hearth/eval/scoring.py
Care interfaces
- Nurse desk
backend/hearth/api/static/nurse.js - Room panel
backend/hearth/api/static/room.js - 3D room view
frontend/room-view/src/LiveView3D.tsx
Other components
- Care team
- USB camera
Connections 24
- USB camera → Pose capture: captures frames
edge/hearth_edge/pose.py - Edge runner → Pose capture: reads poses
edge/run_edge.py - Edge runner → Pose features: computes features
edge/run_edge.py - Edge runner → Backend client: sends observations
edge/run_edge.py - Pose features → Shared contract: formats observations
- Backend client → Ingestion API: posts batches
edge/hearth_edge/client.py - Fall vision → Ingestion API: submits predictions
- Ingestion API → Shared contract: validates messages
backend/hearth/api/app.py - Ingestion API → Monitor service: ingests observations
backend/hearth/api/app.py - Monitor service → Fall detector: checks falls
backend/hearth/monitor/service.py - Monitor service → Gesture rules: checks gestures
backend/hearth/monitor/service.py - Monitor service → Live state: updates state
backend/hearth/monitor/service.py - Ingestion API → Nurse desk: serves nurse page
- Ingestion API → Room panel: serves room page
- Care team → Nurse desk: reviews alerts
- Room panel → Ingestion API: requests help
- Scenario model → Simulation world: defines scenarios
backend/hearth/sim/world.py - Live engine → Simulation world: advances world
backend/hearth/sim/live/engine.py - Scenario playback → Scenario model: loads scenario
backend/hearth/sim/controller.py - Scenario playback → Ingestion API: injects observations
backend/hearth/sim/controller.py - Evaluation study → Batch evaluation: runs batches
backend/hearth/eval/study.py - Evaluation study → Scoring: scores results
backend/hearth/eval/study.py - Scoring → Shared contract: reads records
backend/hearth/eval/scoring.py - 3D room view → Ingestion API: uses monitoring APIs