# shoaibdar/attendance-system architecture

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

- Interactive diagram: https://gitdiagram.com/shoaibdar/attendance-system
- Repository: https://github.com/shoaibdar/attendance-system

## Overview

This is a small, single-script face-recognition attendance application. It loads known faces, reads webcam frames, recognizes matches, writes each person’s attendance once to a CSV, and displays and speaks a confirmation. The source refers to `Pictures/ImagesAttendance`, while the tree lists `ImagesAttendance`; the image-folder link therefore reflects the script’s stated input, not a verified matching directory. All runtime logic is in one file, so the nodes separate responsibilities rather than modules.

Main entry points: [`Attendance_Project.py`](https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py) (Frame recognition), [`ImagesAttendance`](https://github.com/shoaibdar/attendance-system/tree/master/ImagesAttendance) (Known-face images), [`Attendance.csv`](https://github.com/shoaibdar/attendance-system/blob/master/Attendance.csv) (Attendance CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_camera["Webcam"]
node_image_files["Known-face images"]
node_image_loading["Image loading"]
node_known_encoding["Known-face encoding"]
node_recognition["Frame recognition"]
node_attendance["Attendance writer"]
node_csv[("Attendance CSV<br/>[Attendance.csv]")]
node_display["Video display"]
node_speech["Voice confirmation"]

node_image_files -->|"provides images"| node_image_loading
node_image_loading -->|"encodes images"| node_known_encoding
node_camera -->|"supplies frames"| node_recognition
node_known_encoding -->|"provides encodings"| node_recognition
node_recognition -->|"calls on match"| node_attendance
node_attendance -->|"reads and writes"| node_csv
node_recognition -->|"draws and displays"| node_display
node_recognition -->|"speaks confirmation"| node_speech
node_user -->|"quits with key"| node_recognition

click node_image_files "https://github.com/shoaibdar/attendance-system/tree/master/ImagesAttendance"
click node_image_loading "https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py"
click node_known_encoding "https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py"
click node_recognition "https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py"
click node_attendance "https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py"
click node_csv "https://github.com/shoaibdar/attendance-system/blob/master/Attendance.csv"
click node_display "https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py"
click node_speech "https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.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_user toneBlue
class node_camera toneIndigo
class node_image_files,node_image_loading,node_known_encoding,node_recognition,node_attendance,node_display,node_speech toneTeal
class node_csv toneAmber
```

## Components

### Other components

- **User**
- **Webcam**
- [Known-face images](https://github.com/shoaibdar/attendance-system/tree/master/ImagesAttendance): `ImagesAttendance`
- [Image loading](https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py): `Attendance_Project.py`
- [Known-face encoding](https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py): `Attendance_Project.py`
- [Frame recognition](https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py): `Attendance_Project.py`
- [Attendance writer](https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py): `Attendance_Project.py`
- [Attendance CSV](https://github.com/shoaibdar/attendance-system/blob/master/Attendance.csv): `Attendance.csv`
- [Video display](https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py): `Attendance_Project.py`
- [Voice confirmation](https://github.com/shoaibdar/attendance-system/blob/master/Attendance_Project.py): `Attendance_Project.py`

## Connections

- Known-face images → Image loading: provides images (evidence: `Attendance_Project.py`)
- Image loading → Known-face encoding: encodes images (evidence: `Attendance_Project.py`)
- Webcam → Frame recognition: supplies frames (evidence: `Attendance_Project.py`)
- Known-face encoding → Frame recognition: provides encodings (evidence: `Attendance_Project.py`)
- Frame recognition → Attendance writer: calls on match (evidence: `Attendance_Project.py`)
- Attendance writer → Attendance CSV: reads and writes (evidence: `Attendance_Project.py`)
- Frame recognition → Video display: draws and displays (evidence: `Attendance_Project.py`)
- Frame recognition → Voice confirmation: speaks confirmation (evidence: `Attendance_Project.py`)
- User → Frame recognition: quits with key (evidence: `Attendance_Project.py`)
