# saikatcodec/daycare-system architecture

> Architecture diagram of the GitHub repository saikatcodec/daycare-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saikatcodec/daycare-system
- Repository: https://github.com/saikatcodec/daycare-system

## Overview

ChildVision is a prototype daycare video-monitoring application. Its main workflow reads a video or camera stream, tracks children, analyzes the full scene for crying/fighting and each child crop for falls, then annotates and displays or saves frames. The README documents these capabilities; sampled source confirms the pipeline’s capture, detector calls, crop/annotation helpers, and output handling. Detector implementations and logging are represented from their excerpts; runtime wiring for some details is documented rather than independently verified.

Main entry points: [`src/pipeline.py`](https://github.com/saikatcodec/daycare-system/blob/main/src/pipeline.py) (Monitoring pipeline), [`utilities/logger.py`](https://github.com/saikatcodec/daycare-system/blob/main/utilities/logger.py) (Central logger), [`src/childClassifier.py`](https://github.com/saikatcodec/daycare-system/blob/main/src/childClassifier.py) (Child tracking), [`src/behaviorAnalysis.py`](https://github.com/saikatcodec/daycare-system/blob/main/src/behaviorAnalysis.py) (Behavior detection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime orchestration"]
  node_pipeline["Monitoring pipeline<br/>[pipeline.py]"]
end

subgraph group_analysis["Video analysis"]
  node_child_tracking["Child tracking<br/>[childClassifier.py]"]
  node_behavior["Behavior detection"]
  node_fall["Fall detection<br/>[fallDetection.py]"]
end

subgraph group_presentation["Annotation and output"]
  node_image_helpers["Image helpers<br/>[utils.py]"]
  node_annotated_output["Annotated video / display"]
end

subgraph group_operations["Models and logging"]
  node_models["Model artifacts"]
  node_logger["Central logger<br/>[logger.py]"]
  node_log_files["Runtime log files"]
end

node_operator(("Operator / camera"))

node_operator -->|"provides video"| node_pipeline
node_pipeline -->|"tracks children"| node_child_tracking
node_pipeline -->|"submits full frame"| node_behavior
node_pipeline -->|"submits child crops"| node_fall
node_pipeline -->|"crops and draws"| node_image_helpers
node_pipeline -->|"displays and saves"| node_annotated_output
node_pipeline -->|"configures detectors"| node_models
node_pipeline -.->|"logs runtime"| node_logger
node_child_tracking -->|"logs events"| node_logger
node_behavior -->|"logs events"| node_logger
node_fall -->|"logs events"| node_logger
node_logger -->|"writes logs"| node_log_files

click node_pipeline "https://github.com/saikatcodec/daycare-system/blob/main/src/pipeline.py"
click node_child_tracking "https://github.com/saikatcodec/daycare-system/blob/main/src/childClassifier.py"
click node_behavior "https://github.com/saikatcodec/daycare-system/blob/main/src/behaviorAnalysis.py"
click node_fall "https://github.com/saikatcodec/daycare-system/blob/main/src/fallDetection.py"
click node_image_helpers "https://github.com/saikatcodec/daycare-system/blob/main/utilities/utils.py"
click node_models "https://github.com/saikatcodec/daycare-system/tree/main/models"
click node_logger "https://github.com/saikatcodec/daycare-system/blob/main/utilities/logger.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline toneBlue
class node_child_tracking,node_behavior,node_fall toneAmber
class node_image_helpers,node_annotated_output toneMint
class node_models,node_logger,node_log_files toneRose
class node_operator toneIndigo
```

## Components

### Runtime orchestration

- [Monitoring pipeline](https://github.com/saikatcodec/daycare-system/blob/main/src/pipeline.py): `src/pipeline.py`

### Video analysis

- [Child tracking](https://github.com/saikatcodec/daycare-system/blob/main/src/childClassifier.py): `src/childClassifier.py`
- [Behavior detection](https://github.com/saikatcodec/daycare-system/blob/main/src/behaviorAnalysis.py): `src/behaviorAnalysis.py`
- [Fall detection](https://github.com/saikatcodec/daycare-system/blob/main/src/fallDetection.py): `src/fallDetection.py`

### Annotation and output

- [Image helpers](https://github.com/saikatcodec/daycare-system/blob/main/utilities/utils.py): `utilities/utils.py`
- **Annotated video / display**

### Models and logging

- [Model artifacts](https://github.com/saikatcodec/daycare-system/tree/main/models): `models`
- [Central logger](https://github.com/saikatcodec/daycare-system/blob/main/utilities/logger.py): `utilities/logger.py`
- **Runtime log files**

### Other components

- **Operator / camera**

## Connections

- Operator / camera → Monitoring pipeline: provides video (evidence: `README.md`)
- Monitoring pipeline → Child tracking: tracks children (evidence: `README.md`)
- Monitoring pipeline → Behavior detection: submits full frame (evidence: `src/pipeline.py`)
- Monitoring pipeline → Fall detection: submits child crops (evidence: `src/pipeline.py`)
- Monitoring pipeline → Image helpers: crops and draws (evidence: `src/pipeline.py`)
- Monitoring pipeline → Annotated video / display: displays and saves (evidence: `src/pipeline.py`)
- Monitoring pipeline → Model artifacts: configures detectors (evidence: `README.md`)
- Monitoring pipeline → Central logger: logs runtime (evidence: `src/pipeline.py`)
- Child tracking → Central logger: logs events (evidence: `src/childClassifier.py`)
- Behavior detection → Central logger: logs events (evidence: `src/behaviorAnalysis.py`)
- Fall detection → Central logger: logs events (evidence: `src/fallDetection.py`)
- Central logger → Runtime log files: writes logs (evidence: `utilities/logger.py`)
