# iv4n-ga6l/airplane_monitoring_with_runway_detection architecture

> Architecture diagram of the GitHub repository iv4n-ga6l/airplane_monitoring_with_runway_detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iv4n-ga6l/airplane_monitoring_with_runway_detection
- Repository: https://github.com/iv4n-ga6l/airplane_monitoring_with_runway_detection

## Overview

##### Main Components
- Input/Frame Capture Component: Although not explicitly named, video frame ingestion is implied. This could be part of the main application (e.g., in app.py) that feeds individual frames to subsequent modules.
- Runway Detection Module: Utilizes the pre-trained TensorFlow model (model.keras) to identify runway lines.
- Airplane Detection Module: Uses the YOLO11 model weights (yolo11s.pt) for detecting airplanes in the video frames.
- Estimation Module: Implemented in estimation.py, it calculates distances to the runway and determines the airplane’s state (landing, takeoff, etc.), based on positions and runway proximity.
- Main Application Controller: Likely implemented in app.py, this component orchestrates the workflow between frame ingestion, detection modules, and estimation.

##### Relationships and Interactions
- The Main Application Controller (app.py) serves as the central coordinator. It retrieves video frames, then sends each frame to both the Runway Detection Module and Airplane Detection Module.
- The deep learning modules (one based on a TensorFlow model for runway detection and another using YOLO11 for airplane detection) operate in parallel or sequentially to process the frame.
- After obtaining detection results, data is forwarded to the Estimation Module (estimation.py) which calculates distances and classifies the airplane state according to the detection outcomes.

##### Architectural Patterns
- Modular design: Each functionality (detection of runway, airplane detection, and estimation) is encapsulated into separate modules or files for clearer separation of concerns.
- Pipeline – The project pipelines the input frame through multiple independent processing stages (detection and then estimation).
- Integration of multiple frameworks: The system integrates components built with TensorFlow (for runway detection) and PyTorch (for YOLO11 detection, as indicated by the .pt file).

##### Relevant Technologies and Artifacts
- Python as the language, as indicated by the .py files.
- TensorFlow used for the runway detection (model.keras).
- YOLO11 with PyTorch for airplane detection (yolo11s.pt).
- Standard Python modules for video/image processing which are likely referenced in the requirements.txt.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Input Stage"
        FRAME["Frame Ingestion (app.py)"]:::input
    end

    subgraph "Processing Pipeline"
        APP["Main Application Controller (app.py)"]:::controller
        Runway["Runway Detection Module (model.keras)"]:::ai
        Airplane["Airplane Detection Module (YOLO11 via yolo11s.pt)"]:::ai
        Estimation["Estimation Module (estimation.py)"]:::estimation
    end

    subgraph "Output Stage"
        OUTPUT["System Output (Tracking Info)"]:::output
    end

    FRAME -->|"video frames"| APP
    APP -->|"sends frame"| Runway
    APP -->|"sends frame"| Airplane
    Runway -->|"runway results"| Estimation
    Airplane -->|"airplane results"| Estimation
    Estimation -->|"final analysis"| OUTPUT

    click FRAME "https://github.com/iv4n-ga6l/airplane_monitoring_with_runway_detection/blob/main/app.py"
    click APP "https://github.com/iv4n-ga6l/airplane_monitoring_with_runway_detection/blob/main/app.py"
    click Runway "https://github.com/iv4n-ga6l/airplane_monitoring_with_runway_detection/blob/main/runway_detection.py"
    click Airplane "https://github.com/iv4n-ga6l/airplane_monitoring_with_runway_detection/blob/main/yolo11s.pt"
    click Estimation "https://github.com/iv4n-ga6l/airplane_monitoring_with_runway_detection/blob/main/estimation.py"

    classDef controller fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef input fill:#99ccff,stroke:#333,stroke-width:2px;
    classDef ai fill:#ff9999,stroke:#333,stroke-width:2px;
    classDef estimation fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef output fill:#e0e0e0,stroke:#333,stroke-width:2px;
```
