# akkoaya/yolo-vision-hub architecture

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

- Interactive diagram: https://gitdiagram.com/akkoaya/yolo-vision-hub
- Repository: https://github.com/akkoaya/yolo-vision-hub

## Overview

YOLO26 Vision Hub brings dataset handling, multi-framework training, experiment tracking, model export, and image/video inference together behind a Gradio UI and FastAPI API. The main workflow submits training through the service layer to Celery workers, which run a selected plugin and publish logs and metrics; users can then export or run inference. The graph also preserves authentication, project and experiment history, GPU coordination, and bilingual UI. Some branches are documented in the README or SOURCE INDEX but not fully sampled; those links are omitted where runtime ownership is not evidenced.

Main entry points: [`app/api/v1/router.py`](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/api/v1/router.py) (REST API), [`app/ui/pages`](https://github.com/akkoaya/yolo-vision-hub/tree/master/app/ui/pages) (Workflow pages), [`app/tasks/training_tasks.py`](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/tasks/training_tasks.py) (Training workers), [`app/ui/app.py`](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/ui/app.py) (Gradio interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interfaces"]
  node_gradio["Gradio interface<br/>[app.py]"]
  node_ui_pages["Workflow pages"]
  node_i18n["Bilingual UI<br/>[gradio_i18n.py]"]
  node_api["REST API<br/>[router.py]"]
  node_fastapi_app["FastAPI application<br/>[main.py]"]
end

subgraph group_workflow["Vision workflows"]
  node_training_service["Training service"]
  node_inference["Inference engine<br/>[inferencer.py]"]
  node_dataset["Dataset operations<br/>[dataset_ops.py]"]
  node_dataset_detection["Dataset detection"]
  node_export_service["Export service<br/>[export_service.py]"]
end

subgraph group_runtime["Training runtime"]
  node_training_tasks["Training workers<br/>[training_tasks.py]"]
  node_plugin_registry["Plugin registry<br/>[registry.py]"]
  node_model_plugins["Model plugins"]
  node_device["GPU coordination<br/>[device.py]"]
  node_tracker["Experiment tracking<br/>[swanlab_tracker.py]"]
end

subgraph group_domain["Accounts and records"]
  node_auth_service["Authentication<br/>[auth_service.py]"]
  node_audit_service["Audit logging"]
  node_project_service["Project management<br/>[project_service.py]"]
  node_orm["Domain records"]
end

subgraph group_platform["Runtime services"]
  node_redis["Redis queue and streams"]
  node_celery["Celery task queue<br/>[celery_app.py]"]
  node_database[("PostgreSQL")]
  node_swanlab["SwanLab service"]
end

node_browser(("Browser user"))

node_browser -->|"uses"| node_gradio
node_browser -->|"requests"| node_api
node_gradio -->|"builds pages"| node_ui_pages
node_gradio -->|"localizes labels"| node_i18n
node_fastapi_app -->|"mounts routes"| node_api
node_fastapi_app -->|"mounts interface"| node_gradio
node_ui_pages -->|"submits training"| node_training_service
node_training_service -->|"enqueues jobs"| node_celery
node_celery -->|"dispatches tasks"| node_training_tasks
node_training_tasks -->|"selects plugin"| node_plugin_registry
node_plugin_registry -->|"discovers plugins"| node_model_plugins
node_training_tasks -->|"acquires GPU lock"| node_device
node_training_tasks -->|"publishes logs and metrics"| node_redis
node_training_tasks -->|"logs metrics"| node_tracker
node_ui_pages -->|"runs inference"| node_inference
node_api -->|"runs inference"| node_inference
node_inference -->|"queries device"| node_device
node_ui_pages -.->|"manages datasets"| node_dataset
node_ui_pages -.->|"detects formats"| node_dataset_detection
node_ui_pages -.->|"requests exports"| node_export_service
node_api -->|"submits training"| node_training_service
node_api -->|"authenticates"| node_auth_service
node_api -->|"records actions"| node_audit_service
node_api -->|"calls engine"| node_inference
node_training_service -->|"stores experiments"| node_orm
node_auth_service -->|"reads and writes users"| node_database
node_audit_service -->|"reads and writes logs"| node_database
node_project_service -.->|"reads and writes projects"| node_database
node_tracker -.->|"tracks experiments"| node_swanlab
node_training_tasks -->|"updates experiment records"| node_database

click node_gradio "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/ui/app.py"
click node_ui_pages "https://github.com/akkoaya/yolo-vision-hub/tree/master/app/ui/pages"
click node_i18n "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/ui/gradio_i18n.py"
click node_api "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/api/v1/router.py"
click node_training_service "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/training_service.py"
click node_training_tasks "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/tasks/training_tasks.py"
click node_plugin_registry "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/plugins/registry.py"
click node_model_plugins "https://github.com/akkoaya/yolo-vision-hub/tree/master/app/plugins"
click node_device "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/core/device.py"
click node_tracker "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/core/swanlab_tracker.py"
click node_celery "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/tasks/celery_app.py"
click node_inference "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/core/inferencer.py"
click node_dataset "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/utils/dataset_ops.py"
click node_dataset_detection "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/utils/dataset_detection.py"
click node_export_service "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/export_service.py"
click node_auth_service "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/auth_service.py"
click node_audit_service "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/audit_log_service.py"
click node_project_service "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/project_service.py"
click node_orm "https://github.com/akkoaya/yolo-vision-hub/tree/master/app/models"
click node_fastapi_app "https://github.com/akkoaya/yolo-vision-hub/blob/master/app/main.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_gradio,node_ui_pages,node_i18n,node_api,node_fastapi_app,node_browser toneBlue
class node_training_service,node_inference,node_dataset,node_dataset_detection,node_export_service toneAmber
class node_training_tasks,node_plugin_registry,node_model_plugins,node_device,node_tracker toneMint
class node_auth_service,node_audit_service,node_project_service,node_orm toneRose
class node_redis,node_celery,node_database,node_swanlab toneIndigo
```

## Components

### User interfaces

- [Gradio interface](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/ui/app.py): `app/ui/app.py`
- [Workflow pages](https://github.com/akkoaya/yolo-vision-hub/tree/master/app/ui/pages): `app/ui/pages`
- [Bilingual UI](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/ui/gradio_i18n.py): `app/ui/gradio_i18n.py`
- [REST API](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/api/v1/router.py): `app/api/v1/router.py`
- [FastAPI application](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/main.py): `app/main.py`

### Vision workflows

- [Training service](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/training_service.py): `app/services/training_service.py`
- [Inference engine](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/core/inferencer.py): `app/core/inferencer.py`
- [Dataset operations](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/utils/dataset_ops.py): `app/utils/dataset_ops.py`
- [Dataset detection](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/utils/dataset_detection.py): `app/utils/dataset_detection.py`
- [Export service](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/export_service.py): `app/services/export_service.py`

### Training runtime

- [Training workers](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/tasks/training_tasks.py): `app/tasks/training_tasks.py`
- [Plugin registry](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/plugins/registry.py): `app/plugins/registry.py`
- [Model plugins](https://github.com/akkoaya/yolo-vision-hub/tree/master/app/plugins): `app/plugins`
- [GPU coordination](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/core/device.py): `app/core/device.py`
- [Experiment tracking](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/core/swanlab_tracker.py): `app/core/swanlab_tracker.py`

### Accounts and records

- [Authentication](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/auth_service.py): `app/services/auth_service.py`
- [Audit logging](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/audit_log_service.py): `app/services/audit_log_service.py`
- [Project management](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/services/project_service.py): `app/services/project_service.py`
- [Domain records](https://github.com/akkoaya/yolo-vision-hub/tree/master/app/models): `app/models`

### Runtime services

- **Redis queue and streams**
- [Celery task queue](https://github.com/akkoaya/yolo-vision-hub/blob/master/app/tasks/celery_app.py): `app/tasks/celery_app.py`
- **PostgreSQL**
- **SwanLab service**

### Other components

- **Browser user**

## Connections

- Browser user → Gradio interface: uses (evidence: `README.md`)
- Browser user → REST API: requests (evidence: `README.md`)
- Gradio interface → Workflow pages: builds pages (evidence: `app/ui/app.py`)
- Gradio interface → Bilingual UI: localizes labels (evidence: `app/ui/app.py`)
- FastAPI application → REST API: mounts routes (evidence: `app/main.py`)
- FastAPI application → Gradio interface: mounts interface (evidence: `app/main.py`)
- Workflow pages → Training service: submits training (evidence: `app/ui/pages/training.py`)
- Training service → Celery task queue: enqueues jobs (evidence: `app/services/training_service.py`)
- Celery task queue → Training workers: dispatches tasks (evidence: `app/tasks/training_tasks.py`)
- Training workers → Plugin registry: selects plugin (evidence: `app/tasks/training_tasks.py`)
- Plugin registry → Model plugins: discovers plugins (evidence: `app/plugins/registry.py`)
- Training workers → GPU coordination: acquires GPU lock (evidence: `app/tasks/training_tasks.py`)
- Training workers → Redis queue and streams: publishes logs and metrics (evidence: `app/tasks/training_tasks.py`)
- Training workers → Experiment tracking: logs metrics (evidence: `app/tasks/training_tasks.py`)
- Workflow pages → Inference engine: runs inference (evidence: `app/ui/pages/inference.py`)
- REST API → Inference engine: runs inference
- Inference engine → GPU coordination: queries device (evidence: `app/core/inferencer.py`)
- Workflow pages → Dataset operations: manages datasets
- Workflow pages → Dataset detection: detects formats
- Workflow pages → Export service: requests exports
- REST API → Training service: submits training
- REST API → Authentication: authenticates
- REST API → Audit logging: records actions
- REST API → Inference engine: calls engine
- Training service → Domain records: stores experiments (evidence: `app/services/training_service.py`)
- Authentication → PostgreSQL: reads and writes users (evidence: `app/services/auth_service.py`)
- Audit logging → PostgreSQL: reads and writes logs (evidence: `app/services/audit_log_service.py`)
- Project management → PostgreSQL: reads and writes projects
- Experiment tracking → SwanLab service: tracks experiments
- Training workers → PostgreSQL: updates experiment records (evidence: `app/tasks/training_tasks.py`)
