# ignacio-serrano-rodriguez/yolo11-rotonda architecture

> Architecture diagram of the GitHub repository ignacio-serrano-rodriguez/yolo11-rotonda, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ignacio-serrano-rodriguez/yolo11-rotonda
- Repository: https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda

## Overview

##### Project type and purpose
- This is a Python‐based computer‐vision pipeline for detecting and tracking vehicles around a roundabout in Cádiz. It leverages a YOLO object detector, applies a tracking algorithm (“seguimiento”), and reads/writes video streams.

##### File structure
- principal.py – the entry‐point orchestrating the workflow
- video.py      – video I/O: frame acquisition from camera or file, writing annotated output
- seguimiento.py – tracking logic: linking detections across frames
- utiles.py     – utility routines: config parsing, logging, helper functions
- config.yaml   – parameters: model paths, confidence thresholds, I/O paths
- requirements.txt – external dependencies (OpenCV, PyTorch, YOLO library, etc.)

##### README
- Confirms the project goal: “Sistema de detección de vehículos en una rotonda de Cádiz.”

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Entry Point"
        Principal["Entry Point: principal.py"]:::util
    end

    subgraph "Configuration"
        ConfigFile[[Config: config.yaml]]:::config
        ConfigLoader["Config Loader"]:::util
    end

    subgraph "Video I/O"
        FrameReader["Frame Reader"]:::io
        FrameWriter["Frame Writer"]:::io
    end

    subgraph "Processing Pipeline"
        Detector["YOLO Detector"]:::processing
        Tracker["Vehicle Tracker"]:::processing
    end

    External["External Deps"]:::external
    Utilities["Utilities"]:::util

    Principal --> ConfigFile
    Principal --> ConfigLoader
    Principal --> FrameReader

    FrameReader --> Detector
    Detector --> Tracker
    Tracker --> FrameWriter

    ConfigLoader --> Detector
    ConfigLoader --> Tracker

    Utilities -.-> Detector
    Utilities -.-> Tracker
    Utilities -.-> FrameReader
    Utilities -.-> FrameWriter

    External -.-> Detector

    click Principal "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/principal.py"
    click FrameReader "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/video.py"
    click FrameWriter "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/video.py"
    click Tracker "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/seguimiento.py"
    click ConfigLoader "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/utiles.py"
    click Utilities "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/utiles.py"
    click ConfigFile "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/config.yaml"
    click External "https://github.com/ignacio-serrano-rodriguez/yolo11-rotonda/blob/main/requirements.txt"

    classDef io fill:#bbdefb,stroke:#333,stroke-width:1px;
    classDef processing fill:#c8e6c9,stroke:#333,stroke-width:1px;
    classDef util fill:#ffe0b2,stroke:#333,stroke-width:1px;
    classDef config fill:#b2ebf2,stroke:#333,stroke-width:1px;
    classDef external fill:#e0e0e0,stroke:#333,stroke-width:1px;
```
