# niranjananandan/yolov5-self-driving-object-detection architecture

> Architecture diagram of the GitHub repository niranjananandan/yolov5-self-driving-object-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/niranjananandan/yolov5-self-driving-object-detection
- Repository: https://github.com/niranjananandan/yolov5-self-driving-object-detection

## Overview

This repository demonstrates YOLOv5s object detection for self-driving perception, not vehicle control. The documented workflow starts in a notebook, which loads the model and runs image, webcam, and traffic-video detection, displaying boxes and confidence scores. The README documents these capabilities and relationships; no source excerpts were available, so implementation-level calls and unverified details are omitted. The notebook path is documented in the README but is not individually listed in the supplied file tree.

Main entry points: [`YOLOv5_Self_Driving_Object_Detection`](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection) (Detection Notebook), [`road_traffic_video.mp4`](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/road_traffic_video.mp4) (Traffic Video)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Notebook Runtime"]
  node_notebook["Detection Notebook"]
  node_image["Traffic Image"]
  node_webcam(("Webcam Stream"))
  node_video["Traffic Video"]
end

subgraph group_perception["Detection Modes"]
  node_model["YOLOv5s Model"]
  node_image_detection["Image Detection"]
  node_webcam_detection["Webcam Detection"]
  node_video_detection["Video Detection"]
end

subgraph group_outputs["Detection Output"]
  node_display["Boxes and Scores"]
end

node_user(("Notebook User"))

node_user -->|"runs"| node_notebook
node_notebook -->|"loads"| node_model
node_notebook -->|"runs"| node_image_detection
node_notebook -->|"runs"| node_webcam_detection
node_notebook -->|"runs"| node_video_detection
node_image_detection -->|"reads"| node_image
node_webcam_detection -->|"captures"| node_webcam
node_video_detection -->|"reads"| node_video
node_image_detection -->|"invokes"| node_model
node_webcam_detection -->|"invokes"| node_model
node_video_detection -->|"invokes"| node_model
node_model -->|"produces detections"| node_display

click node_notebook "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection"
click node_image "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection"
click node_video "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/road_traffic_video.mp4"
click node_model "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection"
click node_image_detection "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection"
click node_webcam_detection "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection"
click node_video_detection "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection"
click node_display "https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection"

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_notebook,node_image,node_webcam,node_video,node_user toneBlue
class node_model,node_image_detection,node_webcam_detection,node_video_detection toneAmber
class node_display toneMint
```

## Components

### Notebook Runtime

- [Detection Notebook](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection): `YOLOv5_Self_Driving_Object_Detection`
- [Traffic Image](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection): `YOLOv5_Self_Driving_Object_Detection`
- **Webcam Stream**
- [Traffic Video](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/road_traffic_video.mp4): `road_traffic_video.mp4`

### Detection Modes

- [YOLOv5s Model](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection): `YOLOv5_Self_Driving_Object_Detection`
- [Image Detection](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection): `YOLOv5_Self_Driving_Object_Detection`
- [Webcam Detection](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection): `YOLOv5_Self_Driving_Object_Detection`
- [Video Detection](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection): `YOLOv5_Self_Driving_Object_Detection`

### Detection Output

- [Boxes and Scores](https://github.com/niranjananandan/yolov5-self-driving-object-detection/blob/main/YOLOv5_Self_Driving_Object_Detection): `YOLOv5_Self_Driving_Object_Detection`

### Other components

- **Notebook User**

## Connections

- Notebook User → Detection Notebook: runs (evidence: `README.md`)
- Detection Notebook → YOLOv5s Model: loads (evidence: `README.md`)
- Detection Notebook → Image Detection: runs (evidence: `README.md`)
- Detection Notebook → Webcam Detection: runs (evidence: `README.md`)
- Detection Notebook → Video Detection: runs (evidence: `README.md`)
- Image Detection → Traffic Image: reads (evidence: `README.md`)
- Webcam Detection → Webcam Stream: captures (evidence: `README.md`)
- Video Detection → Traffic Video: reads (evidence: `README.md`)
- Image Detection → YOLOv5s Model: invokes (evidence: `README.md`)
- Webcam Detection → YOLOv5s Model: invokes (evidence: `README.md`)
- Video Detection → YOLOv5s Model: invokes (evidence: `README.md`)
- YOLOv5s Model → Boxes and Scores: produces detections (evidence: `README.md`)
