# shu-hdrqad/hdr-iqa-dataset architecture

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

- Interactive diagram: https://gitdiagram.com/shu-hdrqad/hdr-iqa-dataset
- Repository: https://github.com/shu-hdrqad/hdr-iqa-dataset

## Overview

##### Overall Structure and Main Components
- Data Sources:
- Dataset: Indicate the HDRImage folder containing sample HDR images (.exr files) and the Images folder that includes auxiliary analysis graphics.
- Pre-trained Model: Represent the pretrained folder where the pre-trained network is stored.
- Input Module:
- Demo Script: Start with demo.py as the entry point where an HDR image is read.
- Utility Subsystem: Show that demo.py uses utility functions (from utils/, e.g., image_io.py, exrio.py, and others) for reading images and performing necessary pre-processing.
- Core Network (Model):
- Model Module: Represent model/HDRIQA_model.py as implementing the core network.
- DRL Module: Highlight the branch that analyzes local distortions based on dynamic range and HDR artifacts.
- IRQI Module: Indicate the branch that accounts for inter-regional quality dependencies.
- Processing Flow:
- Output:
- Quality Prediction: Include a block (output layer) that represents the numerical quality score or other metrics, achieved after the model processes the image.

- From the dataset (HDR images) to the input module (demo.py).
- From demo.py to utility functions (data pre-processing).
- From pre-processed data into the network model.
- Another style for output components.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources
    subgraph "Data Sources"
        DS1["HDRImage Dataset"]:::data
        DS1aux["Auxiliary Images"]:::data
        DS2["Pre-Trained Model"]:::data
    end

    %% Input Module
    subgraph "Input Module"
        IN["Demo Script (demo.py)"]:::input
    end

    %% Pre-Processing Utilities
    subgraph "Pre-Processing Utilities"
        UT1["image_io.py"]:::util
        UT2["exrio.py"]:::util
    end

    %% Core Network
    subgraph "Core Network"
        CN["HDRIQA Network (model)"]:::network
        DRL["DRL Module"]:::network
        IRQI["IRQI Module"]:::network
    end

    %% Output
    subgraph "Output"
        OUT["Quality Prediction Output"]:::output
    end

    %% Data flow
    DS1 -->|"reads"| IN
    DS1aux -->|"reads"| IN
    IN -->|"calls_preprocessing"| UT1
    IN -->|"calls_preprocessing"| UT2
    UT1 -->|"produces_input"| CN
    UT2 -->|"produces_input"| CN
    DS2 -->|"supplies_weights"| CN
    CN -->|"branches_to"| DRL
    CN -->|"branches_to"| IRQI
    DRL -->|"fuses"| OUT
    IRQI -->|"fuses"| OUT

    %% Click Events
    click DS1 "https://github.com/shu-hdrqad/hdr-iqa-dataset/tree/main/HDRImage/"
    click DS1aux "https://github.com/shu-hdrqad/hdr-iqa-dataset/tree/main/Images/"
    click DS2 "https://github.com/shu-hdrqad/hdr-iqa-dataset/tree/main/pretrained/"
    click IN "https://github.com/shu-hdrqad/hdr-iqa-dataset/blob/main/demo.py"
    click UT1 "https://github.com/shu-hdrqad/hdr-iqa-dataset/blob/main/utils/image_io.py"
    click UT2 "https://github.com/shu-hdrqad/hdr-iqa-dataset/blob/main/utils/exrio.py"
    click CN "https://github.com/shu-hdrqad/hdr-iqa-dataset/blob/main/model/HDRIQA_model.py"
    click DRL "https://github.com/shu-hdrqad/hdr-iqa-dataset/blob/main/model/HDRIQA_model.py"
    click IRQI "https://github.com/shu-hdrqad/hdr-iqa-dataset/blob/main/model/HDRIQA_model.py"

    %% Styles
    classDef data fill:#FFDAB9,stroke:#333,stroke-width:2px;
    classDef input fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef util fill:#98FB98,stroke:#333,stroke-width:2px;
    classDef network fill:#FFFACD,stroke:#333,stroke-width:2px;
    classDef output fill:#E6E6FA,stroke:#333,stroke-width:2px;
```
