Project Directory Map
This document serves as the “Atlas” for the Drowsiness Detection project. It maps every file in the source code to its purpose and its corresponding documentation page.
Source Code Architecture
The project is organized into a “Pipeline” structure: Data Training Inference.
graph TD Data[data.yaml] -->|Defines| Train[train_yolo.py] Train -->|Produces| Model[models/*.pt] Model -->|Powers| Infer[drowsiness_detection.py] Infer -->|Triggers| Alert[Alerts: Sound/Notification] Req[requirements.txt] -->|Supports| All[All Scripts]
Detailed File Index
| File / Folder | Technical Role | Beginner’s Explanation | Documentation Link |
|---|---|---|---|
data.yaml | Configuration | Tells the AI where the images are. | dataset |
train_yolo.py | Trainer | The script that teaches the AI. | model-training |
drowsiness_detection.py | Engine | The real-time monitoring script. | detection-system |
models/ | Weight Storage | Stores the “learned” AI brain (.pt files). | architecture |
requirements.txt | Manifest | List of all needed software libraries. | environment |
runs/ | Artifacts | Stores training logs and accuracy charts. | model-training |
README.md | Overview | Quick-start guide. | index |
Documentation Hierarchy
The documentation is structured to take you from “Curious” to “Expert”:
- The Big Picture
index.md - The Setup
configuration/environment.md - The AI Logic
models/architecture.mdtraining/dataset.mdtraining/model-training.md - The Real-time Engine
inference/detection-system.mdinference/alert-mechanism.md - Fine Tuning
configuration/hyperparameters.md