# ffathy-tdx/aam-cv-fsae architecture

> Architecture diagram of the GitHub repository ffathy-tdx/aam-cv-fsae, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ffathy-tdx/aam-cv-fsae
- Repository: https://github.com/ffathy-tdx/aam-cv-fsae

## Overview

##### Project type and purpose
- This is a small computer-vision support project for FSAE competitions. It consists of:
- Two Python data-preparation scripts (`remove_class.py` and `count_class.py`) that operate on the YOLO-formatted dataset.
- A ROS package (`yolov10_cone_detection/`) that runs a YOLOv10-based cone detection node in real time, with CMake build files, a ROS launch file, and a Python node implementation.

##### File structure
- Top level:
- LICENSE, README.md
- `remove_class.py` and `count_class.py`: standalone dataset-prep tools
- `yolov10_cone_detection/`: a ROS workspace package
- Inside `yolov10_cone_detection/`:
- `CMakeLists.txt`, `package.xml`: ROS build configuration
- `launch/yolo_cone_detection.launch`: launch description to start the node
- `src/`:
– `yolo_cone_detection_node.py`: subscribes to camera topics, runs YOLOv10 inference, publishes detection topics
– `test.py`: test or utility for the node

##### README for additional insights
- Dataset scripts improve label integrity and distribution before training.
- The ROS package is not documented in README, but by naming it “cone_detection” and seeing standard ROS layout, its role is inference at runtime.

##### Details to capture
- Launch file invoking the node and setting parameters.
- File paths (e.g. `yolov10_cone_detection/src/yolo_cone_detection_node.py`) as annotations if desired.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Offline Data Pipeline"
        RawData[(Raw Dataset)]:::artifact
        Remove["remove_class.py"]:::offline
        Count["count_class.py"]:::offline
        CleanedData[(Cleaned Dataset)]:::artifact
        RawData -->|"reads labels"| Remove
        RawData -->|"reads labels"| Count
        Remove -->|"writes cleaned labels"| CleanedData
        Count -->|"writes label count report"| CleanedData
    end

    subgraph "Online Inference Pipeline"
        CMake["CMakeLists.txt"]:::online
        Package["package.xml"]:::online
        Launch["yolo_cone_detection.launch"]:::online
        ROSMaster["ROS Master"]:::online
        Camera["/camera/image_raw"]:::online
        Node["yolo_cone_detection_node.py"]:::online
        Test["test.py"]:::online
        Weights[(YOLOv10 Weights)]:::artifact
        Detections["/cone_detections"]:::online

        CMake -->|provides build config| Launch
        Package -->|provides package metadata| Launch
        Launch -->|"starts node"| ROSMaster
        ROSMaster -->|"initializes"| Node
        Camera -->|"publishes image"| Node
        Node -->|"loads weights"| Weights
        Node -->|"publishes detections"| Detections
        Test -->|"invokes node for testing"| Node
    end

    click Remove "https://github.com/ffathy-tdx/aam-cv-fsae/blob/main/remove_class.py"
    click Count "https://github.com/ffathy-tdx/aam-cv-fsae/blob/main/count_class.py"
    click CMake "https://github.com/ffathy-tdx/aam-cv-fsae/blob/main/yolov10_cone_detection/CMakeLists.txt"
    click Package "https://github.com/ffathy-tdx/aam-cv-fsae/blob/main/yolov10_cone_detection/package.xml"
    click Launch "https://github.com/ffathy-tdx/aam-cv-fsae/blob/main/yolov10_cone_detection/launch/yolo_cone_detection.launch"
    click Node "https://github.com/ffathy-tdx/aam-cv-fsae/blob/main/yolov10_cone_detection/src/yolo_cone_detection_node.py"
    click Test "https://github.com/ffathy-tdx/aam-cv-fsae/blob/main/yolov10_cone_detection/src/test.py"

    classDef offline fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef online fill:#90EE90,stroke:#333,stroke-width:1px
    classDef artifact fill:#D3D3D3,stroke:#333,stroke-width:1px
```
