# sumeshe/helmet-detection-using-yolo11 architecture

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

- Interactive diagram: https://gitdiagram.com/sumeshe/helmet-detection-using-yolo11
- Repository: https://github.com/sumeshe/helmet-detection-using-yolo11

## Overview

This repository is a YOLO11 helmet-detection application with separate scripts for training, image inference, and video inference. The documented workflow trains a model and applies it to image or video inputs, annotating detections and presenting or saving results. The graph preserves GPU capability as documented; the README also describes future integrations, which are not implemented in the available source. Sampled scripts establish the shown calls; some input and output directories are documented but absent from the tree.

Main entry points: [`image_detection.py`](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/image_detection.py) (Image Detection), [`video_detection.py`](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/video_detection.py) (Video Detection), [`train.py`](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/train.py) (Train YOLO), [`models/helmet_detection_large.pt`](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/models/helmet_detection_large.pt) (Trained Weights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Model Training"]
  node_trainer["Train YOLO<br/>[train.py]"]
  node_gpu["GPU Check<br/>[check_gpu.py]"]
end

subgraph group_inference["Detection"]
  node_image["Image Detection<br/>[image_detection.py]"]
  node_video["Video Detection<br/>[video_detection.py]"]
end

subgraph group_assets["Model Assets"]
  node_model["Trained Weights"]
end

node_user(("Operator"))
node_images["Image Inputs"]
node_videos["Video Inputs"]
node_results["Detection Outputs"]
node_display["OpenCV Display"]
node_dataset["Training Dataset"]
node_trained["Training Runs"]

node_user -->|"starts training"| node_trainer
node_trainer -->|"loads dataset"| node_dataset
node_trainer -->|"writes runs"| node_trained
node_user -->|"checks capability"| node_gpu
node_user -->|"runs inference"| node_image
node_image -->|"loads weights"| node_model
node_images -->|"provides image"| node_image
node_image -->|"writes annotated image"| node_results
node_image -->|"shows detections"| node_display
node_user -->|"runs inference"| node_video
node_video -->|"loads weights"| node_model
node_videos -->|"provides video"| node_video
node_video -->|"writes annotated video"| node_results
node_video -->|"shows frames"| node_display

click node_trainer "https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/train.py"
click node_gpu "https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/check_gpu.py"
click node_image "https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/image_detection.py"
click node_video "https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/video_detection.py"
click node_model "https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/models/helmet_detection_large.pt"
click node_images "https://github.com/sumeshe/helmet-detection-using-yolo11/tree/main/images"

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_trainer,node_gpu toneBlue
class node_image,node_video toneAmber
class node_model toneMint
class node_user,node_videos,node_results,node_display,node_dataset,node_trained toneIndigo
class node_images toneTeal
```

## Components

### Model Training

- [Train YOLO](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/train.py): `train.py`
- [GPU Check](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/check_gpu.py): `check_gpu.py`

### Detection

- [Image Detection](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/image_detection.py): `image_detection.py`
- [Video Detection](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/video_detection.py): `video_detection.py`

### Model Assets

- [Trained Weights](https://github.com/sumeshe/helmet-detection-using-yolo11/blob/main/models/helmet_detection_large.pt): `models/helmet_detection_large.pt`

### Other components

- **Operator**
- [Image Inputs](https://github.com/sumeshe/helmet-detection-using-yolo11/tree/main/images): `images`
- **Video Inputs**
- **Detection Outputs**
- **OpenCV Display**
- **Training Dataset**
- **Training Runs**

## Connections

- Operator → Train YOLO: starts training (evidence: `README.md`)
- Train YOLO → Training Dataset: loads dataset (evidence: `train.py`)
- Train YOLO → Training Runs: writes runs (evidence: `train.py`)
- Operator → GPU Check: checks capability (evidence: `README.md`)
- Operator → Image Detection: runs inference (evidence: `README.md`)
- Image Detection → Trained Weights: loads weights (evidence: `image_detection.py`)
- Image Inputs → Image Detection: provides image (evidence: `image_detection.py`)
- Image Detection → Detection Outputs: writes annotated image (evidence: `image_detection.py`)
- Image Detection → OpenCV Display: shows detections (evidence: `image_detection.py`)
- Operator → Video Detection: runs inference (evidence: `README.md`)
- Video Detection → Trained Weights: loads weights (evidence: `video_detection.py`)
- Video Inputs → Video Detection: provides video (evidence: `video_detection.py`)
- Video Detection → Detection Outputs: writes annotated video (evidence: `video_detection.py`)
- Video Detection → OpenCV Display: shows frames (evidence: `video_detection.py`)
