# bohdan213/thesis_synthetic_image_detection architecture

> Architecture diagram of the GitHub repository bohdan213/thesis_synthetic_image_detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bohdan213/thesis_synthetic_image_detection
- Repository: https://github.com/bohdan213/thesis_synthetic_image_detection

## Overview

This repository is a research implementation for detecting AI-generated images in misinformation contexts. The principal workflow is to prepare or obtain image datasets, configure and run a classifier notebook for training or inference, and inspect its results. The documented alternatives are a foundation-backbone/MLP classifier and a two-branch foundation-plus-LBP/ResNet-18 classifier. Dataset-generation notebooks are named for several image-generation models. Notebook internals were not sampled, so links reflect README-described architecture and workflow rather than unverified cell-level calls.

Main entry points: [`foundation-lbp-classifier.ipynb`](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb) (Foundation + LBP classifier), [`foundation-classifier.ipynb`](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb) (Foundation classifier), [`dataset/dataset-creation-scripts/generate_flux1_dev.ipynb`](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_flux1_dev.ipynb) (Flux generation), [`dataset/dataset-creation-scripts/generate_pixart.ipynb`](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_pixart.ipynb) (PixArt generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_genimage[("GenImage data")]
  node_misinfo[("Misinfo data")]
  node_fluxgen["Flux generation"]
  node_pixartgen["PixArt generation"]
  node_sdxlgen["SDXL generation"]
  node_imagen["Imagen generation"]
end

subgraph group_models["Detection models"]
  node_single["Foundation classifier"]
  node_dual["Foundation + LBP classifier"]
  node_foundation["Foundation backbone"]
  node_mlp["MLP head"]
  node_foundation2["Foundation branch"]
  node_lbp["LBP representation"]
  node_resnet["ResNet-18 branch"]
  node_commonmlp["Common MLP head"]
end

subgraph group_results["Evaluation"]
  node_resultsout["Training and inference results"]
  node_resultsout2["Training and inference results"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs"| node_fluxgen
node_researcher -->|"runs"| node_pixartgen
node_researcher -->|"runs"| node_sdxlgen
node_researcher -->|"runs"| node_imagen
node_fluxgen -->|"generates images"| node_genimage
node_pixartgen -->|"generates images"| node_genimage
node_sdxlgen -->|"generates images"| node_genimage
node_imagen -->|"generates images"| node_genimage
node_genimage -->|"training and evaluation data"| node_single
node_genimage -->|"training and evaluation data"| node_dual
node_misinfo -->|"evaluation data"| node_single
node_misinfo -->|"evaluation data"| node_dual
node_researcher -->|"configures and runs"| node_single
node_researcher -->|"configures and runs"| node_dual
node_single -->|"uses backbone"| node_foundation
node_single -->|"uses head"| node_mlp
node_dual -->|"uses branch"| node_foundation2
node_dual -->|"uses representation"| node_lbp
node_dual -->|"uses branch"| node_resnet
node_dual -->|"uses head"| node_commonmlp
node_single -->|"produces"| node_resultsout
node_dual -->|"produces"| node_resultsout2
node_researcher -->|"reviews"| node_resultsout
node_researcher -->|"reviews"| node_resultsout2

click node_fluxgen "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_flux1_dev.ipynb"
click node_pixartgen "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_pixart.ipynb"
click node_sdxlgen "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_sdxl1.ipynb"
click node_imagen "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/genererate_imagen.ipynb"
click node_single "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb"
click node_dual "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb"
click node_foundation "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb"
click node_mlp "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb"
click node_foundation2 "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb"
click node_lbp "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb"
click node_resnet "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb"
click node_commonmlp "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb"
click node_resultsout "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb"
click node_resultsout2 "https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_genimage,node_misinfo,node_fluxgen,node_pixartgen,node_sdxlgen,node_imagen toneBlue
class node_single,node_dual,node_foundation,node_mlp,node_foundation2,node_lbp,node_resnet,node_commonmlp toneAmber
class node_resultsout,node_resultsout2 toneMint
class node_researcher toneIndigo
```

## Components

### Data preparation

- **GenImage data**
- **Misinfo data**
- [Flux generation](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_flux1_dev.ipynb): `dataset/dataset-creation-scripts/generate_flux1_dev.ipynb`
- [PixArt generation](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_pixart.ipynb): `dataset/dataset-creation-scripts/generate_pixart.ipynb`
- [SDXL generation](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/generate_sdxl1.ipynb): `dataset/dataset-creation-scripts/generate_sdxl1.ipynb`
- [Imagen generation](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/dataset/dataset-creation-scripts/genererate_imagen.ipynb): `dataset/dataset-creation-scripts/genererate_imagen.ipynb`

### Detection models

- [Foundation classifier](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb): `foundation-classifier.ipynb`
- [Foundation + LBP classifier](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb): `foundation-lbp-classifier.ipynb`
- [Foundation backbone](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb): `foundation-classifier.ipynb`
- [MLP head](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb): `foundation-classifier.ipynb`
- [Foundation branch](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb): `foundation-lbp-classifier.ipynb`
- [LBP representation](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb): `foundation-lbp-classifier.ipynb`
- [ResNet-18 branch](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb): `foundation-lbp-classifier.ipynb`
- [Common MLP head](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb): `foundation-lbp-classifier.ipynb`

### Evaluation

- [Training and inference results](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-classifier.ipynb): `foundation-classifier.ipynb`
- [Training and inference results](https://github.com/bohdan213/thesis_synthetic_image_detection/blob/main/foundation-lbp-classifier.ipynb): `foundation-lbp-classifier.ipynb`

### Other components

- **Researcher**

## Connections

- Researcher → Flux generation: runs
- Researcher → PixArt generation: runs
- Researcher → SDXL generation: runs
- Researcher → Imagen generation: runs
- Flux generation → GenImage data: generates images
- PixArt generation → GenImage data: generates images
- SDXL generation → GenImage data: generates images
- Imagen generation → GenImage data: generates images
- GenImage data → Foundation classifier: training and evaluation data
- GenImage data → Foundation + LBP classifier: training and evaluation data
- Misinfo data → Foundation classifier: evaluation data
- Misinfo data → Foundation + LBP classifier: evaluation data
- Researcher → Foundation classifier: configures and runs
- Researcher → Foundation + LBP classifier: configures and runs
- Foundation classifier → Foundation backbone: uses backbone
- Foundation classifier → MLP head: uses head
- Foundation + LBP classifier → Foundation branch: uses branch
- Foundation + LBP classifier → LBP representation: uses representation
- Foundation + LBP classifier → ResNet-18 branch: uses branch
- Foundation + LBP classifier → Common MLP head: uses head
- Foundation classifier → Training and inference results: produces
- Foundation + LBP classifier → Training and inference results: produces
- Researcher → Training and inference results: reviews
- Researcher → Training and inference results: reviews
