# geekjr/quickai architecture

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

- Interactive diagram: https://gitdiagram.com/geekjr/quickai
- Repository: https://github.com/geekjr/quickai

## Overview

##### Main Components

a) Core Library Components:
- Image Classification Module
- Text Processing Module
- YOLO Object Detection Module
- Model Registry/Hub
- Data Processing Pipeline

b) External Dependencies:
- TensorFlow
- PyTorch
- Hugging Face Transformers
- Other ML Libraries (sklearn, numpy)

**User Applications/Examples Layer**
**↓**
**QuickAI API Layer**
**↓**
**Model Implementation Layer**
**↓**
**Framework Integration Layer**
**↓**
**Base Dependencies Layer**

##### Component Relationships

a) User Interface Components:
- How example scripts connect to the main library
- Demonstrate data flow from input to model output

b) Core Processing Flow:
- Data ingestion → Preprocessing → Model Selection → Training/Inference → Output

c) Model Integration:
- How different model types (Image, Text, YOLO) interface with their respective frameworks

##### Specific Implementation Details

Key architectural elements:

a) Image Classification Pipeline:
- Model selection interface
- Training data processor
- Inference engine
- Supported model architectures (EfficientNet, VGG, etc.)

b) NLP Components:
- Text processing pipeline
- Multiple model support (GPT-NEO, BERT variants)
- Fine-tuning interface
- Inference engine

c) YOLO Implementation:
- Detection pipeline
- Custom training support
- Video/Image processing
- Weight management

##### Integration Points

Highlight:
- Docker container integration
- Framework compatibility layer
- Model weight management
- Dataset handling

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Applications Layer"
        EX1["Image Classification Examples"]:::example
        EX2["Text Processing Examples"]:::example
        EX3["YOLO Examples"]:::example
    end

    subgraph "QuickAI API Layer"
        IC["Image Classification Module"]:::core
        TP["Text Processing Module"]:::core
        YD["YOLO Detection Module"]:::core
    end

    subgraph "Model Implementation Layer"
        subgraph "Image Models"
            IMC["Model Selection Interface"]:::model
            IMP["Training Data Processor"]:::model
            IMI["Inference Engine"]:::model
        end

        subgraph "Text Models"
            TFT["Fine-tuning Interface"]:::model
            TIP["Text Processing Pipeline"]:::model
            TIE["Inference Engine"]:::model
        end

        subgraph "YOLO Components"
            YDP["Detection Pipeline"]:::model
            YTP["Training Pipeline"]:::model
            YPP["Preprocessing"]:::model
            YDS["Dataset Handler"]:::model
            YCF["Configuration"]:::model
            YUT["Utilities"]:::model
        end
    end

    subgraph "Framework Integration Layer"
        TF["TensorFlow"]:::framework
        PT["PyTorch"]:::framework
        HF["Hugging Face"]:::framework
    end

    subgraph "Base Dependencies Layer"
        SKL["scikit-learn"]:::dep
        NP["NumPy"]:::dep
        DC["Docker Container"]:::dep
    end

    %% Connections
    EX1 --> IC
    EX2 --> TP
    EX3 --> YD

    IC --> IMC & IMP & IMI
    TP --> TFT & TIP & TIE
    YD --> YDP & YTP & YPP & YDS

    IMC & IMP & IMI --> TF & PT
    TFT & TIP & TIE --> HF
    YDP & YTP --> PT

    %% Click Events
    click IC "https://github.com/geekjr/quickai/blob/main/quickai/image_classification.py"
    click TP "https://github.com/geekjr/quickai/blob/main/quickai/text_finetuning.py"
    click YD "https://github.com/geekjr/quickai/tree/main/quickai/yolo"
    click EX1 "https://github.com/geekjr/quickai/blob/main/examples/image_classification.py"
    click EX2 "https://github.com/geekjr/quickai/blob/main/examples/text_fine_tuning.py"
    click EX3 "https://github.com/geekjr/quickai/blob/main/examples/yolov4_image.py"
    click YDP "https://github.com/geekjr/quickai/blob/main/quickai/yolo/detect.py"
    click YTP "https://github.com/geekjr/quickai/blob/main/quickai/yolo/train.py"
    click YPP "https://github.com/geekjr/quickai/blob/main/quickai/yolo/preprocess.py"
    click YDS "https://github.com/geekjr/quickai/blob/main/quickai/yolo/dataset.py"
    click YCF "https://github.com/geekjr/quickai/blob/main/quickai/yolo/config.py"
    click YUT "https://github.com/geekjr/quickai/blob/main/quickai/yolo/utils.py"
    click DC "https://github.com/geekjr/quickai/tree/main/Dockerfile"

    %% Styling
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef model fill:#9b59b6,stroke:#8e44ad,color:white
    classDef framework fill:#2ecc71,stroke:#27ae60,color:white
    classDef dep fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef example fill:#e67e22,stroke:#d35400,color:white

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Model Components"]:::model
        L3["Frameworks"]:::framework
        L4["Dependencies"]:::dep
        L5["Examples"]:::example
    end
```
