# althafshaik15/realvision architecture

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

- Interactive diagram: https://gitdiagram.com/althafshaik15/realvision
- Repository: https://github.com/althafshaik15/realvision

## Overview

RealVision is a webcam-based object identifier. The user starts the app and can pause, mute speech, request a scan, or switch detection backends; captured frames are analyzed, results are drawn over the video, and selected labels can be spoken aloud. The source shows local YOLO and optional Gemini recognition, but no README or sampled source documents further product features.

Main entry points: [`main.py`](https://github.com/althafshaik15/realvision/blob/main/main.py) (App loop), [`detector.py`](https://github.com/althafshaik15/realvision/blob/main/detector.py) (Detector), [`speaker.py`](https://github.com/althafshaik15/realvision/blob/main/speaker.py) (Speech selection), [`config.py`](https://github.com/althafshaik15/realvision/blob/main/config.py) (Configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App workflow"]
  node_main["App loop<br/>[main.py]"]
  node_config["Configuration<br/>[config.py]"]
end

subgraph group_recognition["Object recognition"]
  node_detector["Detector<br/>[detector.py]"]
  node_yolo["YOLO backend<br/>[detector.py]"]
  node_gemini["Gemini backend<br/>[detector.py]"]
  node_model["YOLO weights<br/>[yolov8n.pt]"]
end

subgraph group_output["Result presentation"]
  node_display["Video display"]
  node_speaker["Speech selection<br/>[speaker.py]"]
end

node_user(("User"))
node_camera["Webcam"]
node_gemini_api["Gemini API"]
node_tts["System speech"]

node_user -->|"controls"| node_main
node_camera -->|"provides frames"| node_main
node_main -->|"reads settings"| node_config
node_main -->|"submits frames"| node_detector
node_detector -->|"dispatches"| node_yolo
node_detector -->|"dispatches"| node_gemini
node_yolo -->|"loads weights"| node_model
node_gemini -.->|"sends image"| node_gemini_api
node_detector -->|"returns detections"| node_main
node_main -->|"shows video"| node_display
node_main -->|"submits detections"| node_speaker
node_speaker -->|"reads speech settings"| node_config
node_speaker -->|"speaks labels"| node_tts

click node_main "https://github.com/althafshaik15/realvision/blob/main/main.py"
click node_config "https://github.com/althafshaik15/realvision/blob/main/config.py"
click node_detector "https://github.com/althafshaik15/realvision/blob/main/detector.py"
click node_yolo "https://github.com/althafshaik15/realvision/blob/main/detector.py"
click node_gemini "https://github.com/althafshaik15/realvision/blob/main/detector.py"
click node_model "https://github.com/althafshaik15/realvision/blob/main/yolov8n.pt"
click node_speaker "https://github.com/althafshaik15/realvision/blob/main/speaker.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_main,node_config,node_user toneBlue
class node_detector,node_yolo,node_gemini,node_model toneAmber
class node_display,node_speaker,node_gemini_api toneMint
class node_camera,node_tts toneIndigo
```

## Components

### App workflow

- [App loop](https://github.com/althafshaik15/realvision/blob/main/main.py): `main.py`
- [Configuration](https://github.com/althafshaik15/realvision/blob/main/config.py): `config.py`

### Object recognition

- [Detector](https://github.com/althafshaik15/realvision/blob/main/detector.py): `detector.py`
- [YOLO backend](https://github.com/althafshaik15/realvision/blob/main/detector.py): `detector.py`
- [Gemini backend](https://github.com/althafshaik15/realvision/blob/main/detector.py): `detector.py`
- [YOLO weights](https://github.com/althafshaik15/realvision/blob/main/yolov8n.pt): `yolov8n.pt`

### Result presentation

- **Video display**
- [Speech selection](https://github.com/althafshaik15/realvision/blob/main/speaker.py): `speaker.py`

### Other components

- **User**
- **Webcam**
- **Gemini API**
- **System speech**

## Connections

- User → App loop: controls
- Webcam → App loop: provides frames
- App loop → Configuration: reads settings
- App loop → Detector: submits frames
- Detector → YOLO backend: dispatches
- Detector → Gemini backend: dispatches
- YOLO backend → YOLO weights: loads weights
- Gemini backend → Gemini API: sends image
- Detector → App loop: returns detections
- App loop → Video display: shows video
- App loop → Speech selection: submits detections
- Speech selection → Configuration: reads speech settings
- Speech selection → System speech: speaks labels
