# duongtruongbinh/improve_vivqa-x_baseline architecture

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

- Interactive diagram: https://gitdiagram.com/duongtruongbinh/improve_vivqa-x_baseline
- Repository: https://github.com/duongtruongbinh/improve_vivqa-x_baseline

## Overview

##### Project type and purpose
- From the file‐tree and naming conventions (“src/inference/qwenvl.py”, “src/evaluation/eval.py”, “notebooks/test.ipynb”, “results/ViVQA-X_test_…json”) this is an ML evaluation pipeline for a vision-language model (Qwen2.5-VL-7B). Its main purpose is to take a set of vision-question inputs, run inference through the VL model, and compute evaluation metrics.

##### File structure
- Top-level:
- .gitignore, README.md
- requirements.txt (Python deps)
- configs/ (placeholder for configuration files)
- docker/ (Dockerfile or related scripts)
- notebooks/ (interactive analysis)
- scripts/ (utility or orchestration scripts)
- src/inference (model‐inference code)
- src/evaluation (evaluation code + stored evaluation_scores.json)
- results/ (output JSONs from inference/evaluation)
- tests/ (unit or integration tests)
- Patterns & architectural hints:
- Separation between inference and evaluation modules
- Use of Docker for environment reproducibility
- Configs directory suggests configurable hyperparameters or dataset paths
- Notebooks for exploratory data analysis / result visualization
- Scripts for glue logic (e.g., kicking off a full pipeline)

##### README
- (Empty in this case—rely entirely on folder names and code responsibilities.)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Docker Container
    subgraph "Docker Container"
        direction TB
        requirements["requirements.txt"]:::data
        configs["configs/"]:::data
        subgraph "Codebase"
            direction TB
            inference["Inference Module"]:::code
            evaluation["Evaluation Module"]:::code
            scripts["Orchestration Scripts"]:::orchestration
            tests["Testing Suite"]:::code
            readme["Project README"]:::data
            gitignore[".gitignore"]:::data
        end
    end

    %% External Components
    inputData["Input Dataset (Images + Questions)"]:::data
    rawResults["Raw Predictions"]:::data
    metrics["Evaluation Results (metrics)"]:::data
    notebook["Interactive Analysis Notebooks"]:::code

    %% Data Flow
    inputData -->|dataset| inference
    inference -->|.json predictions| rawResults
    rawResults --> evaluation
    evaluation -->|evaluation_scores.json| metrics
    metrics --> notebook

    %% Config/Deps Usage
    requirements --> inference
    requirements --> evaluation
    configs --> inference
    configs --> evaluation

    %% Orchestration & Testing
    scripts --> inference
    scripts --> evaluation
    tests --> inference
    tests --> evaluation

    %% Click Events
    click requirements "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/requirements.txt"
    click configs "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/tree/main/configs/"
    click inference "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/src/inference/qwenvl.py"
    click evaluation "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/src/evaluation/eval.py"
    click metrics "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/src/evaluation/evaluation_scores.json"
    click rawResults "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/results/ViVQA-X_test_Qwen2.5-VL-7B-Instruct.json"
    click notebook "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/notebooks/test.ipynb"
    click scripts "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/tree/main/scripts/"
    click tests "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/tree/main/tests/"
    click readme "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/README.md"
    click gitignore "https://github.com/duongtruongbinh/improve_vivqa-x_baseline/blob/main/.gitignore"

    %% Styles
    classDef code fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef data fill:#90EE90,stroke:#000,stroke-width:1px
    classDef orchestration fill:#FFA500,stroke:#000,stroke-width:1px
    classDef environment fill:#D3D3D3,stroke:#000,stroke-width:1px
```
