# pratik5200/vlm-project architecture

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

- Interactive diagram: https://gitdiagram.com/pratik5200/vlm-project
- Repository: https://github.com/pratik5200/vlm-project

## Overview

This repository is a notebook-based image-restoration project. Its documented main workflow detects image degradations, runs DA-CLIP restoration for each detected type, combines the outputs, and evaluates the result. It also explores AutoDIR as a related framework and describes DIV2K data preparation. The notebook contents were not provided, so the diagram reflects README-documented stages rather than verified implementation details or notebook-specific responsibilities.

Main entry points: [`da-clip-updated.ipynb`](https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb) (Quality evaluation), [`autodir .ipynb`](https://github.com/pratik5200/vlm-project/blob/main/autodir%20.ipynb) (Degradation classification), [`daclip .ipynb`](https://github.com/pratik5200/vlm-project/blob/main/daclip%20.ipynb) (Data preparation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_restoration["Restoration workflow"]
  node_degraded["Degraded image"]
  node_finder["Degradation finder"]
  node_daclip["DA-CLIP restoration"]
  node_combine["Result combining"]
  node_restored["Restored image"]
end

subgraph group_evaluation["Data and evaluation"]
  node_div2k[("DIV2K data")]
  node_data_prep["Data preparation<br/>[daclip .ipynb]"]
  node_quality["Quality evaluation"]
  node_metrics["PSNR SSIM LPIPS"]
  node_saved_results["Saved results<br/>[Result_output.zip]"]
end

subgraph group_autodir["AutoDIR exploration"]
  node_autodir_detect["Degradation classification<br/>[autodir .ipynb]"]
  node_autodir_restore["Latent diffusion restoration<br/>[autodir .ipynb]"]
end

node_user(("Image user"))

node_user -->|"provides"| node_degraded
node_degraded -->|"detects types"| node_finder
node_finder -->|"conditions passes"| node_daclip
node_daclip -->|"produces outputs"| node_combine
node_combine -->|"merges into"| node_restored
node_div2k -->|"provides images"| node_data_prep
node_restored -->|"compares with reference"| node_quality
node_div2k -->|"provides reference"| node_quality
node_quality -->|"reports"| node_metrics
node_autodir_detect -->|"detects then restores"| node_autodir_restore

click node_finder "https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb"
click node_daclip "https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb"
click node_combine "https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb"
click node_data_prep "https://github.com/pratik5200/vlm-project/blob/main/daclip%20.ipynb"
click node_quality "https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb"
click node_saved_results "https://github.com/pratik5200/vlm-project/blob/main/results/Result_output.zip"
click node_autodir_detect "https://github.com/pratik5200/vlm-project/blob/main/autodir%20.ipynb"
click node_autodir_restore "https://github.com/pratik5200/vlm-project/blob/main/autodir%20.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_degraded,node_finder,node_daclip,node_combine,node_restored,node_user toneBlue
class node_div2k,node_data_prep,node_quality,node_metrics,node_saved_results toneAmber
class node_autodir_detect,node_autodir_restore toneMint
```

## Components

### Restoration workflow

- **Degraded image**
- [Degradation finder](https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb): `da-clip-updated.ipynb`
- [DA-CLIP restoration](https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb): `da-clip-updated.ipynb`
- [Result combining](https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb): `da-clip-updated.ipynb`
- **Restored image**

### Data and evaluation

- **DIV2K data**
- [Data preparation](https://github.com/pratik5200/vlm-project/blob/main/daclip%20.ipynb): `daclip .ipynb`
- [Quality evaluation](https://github.com/pratik5200/vlm-project/blob/main/da-clip-updated.ipynb): `da-clip-updated.ipynb`
- **PSNR SSIM LPIPS**
- [Saved results](https://github.com/pratik5200/vlm-project/blob/main/results/Result_output.zip): `results/Result_output.zip`

### AutoDIR exploration

- [Degradation classification](https://github.com/pratik5200/vlm-project/blob/main/autodir%20.ipynb): `autodir .ipynb`
- [Latent diffusion restoration](https://github.com/pratik5200/vlm-project/blob/main/autodir%20.ipynb): `autodir .ipynb`

### Other components

- **Image user**

## Connections

- Image user → Degraded image: provides (evidence: `README.md`)
- Degraded image → Degradation finder: detects types (evidence: `README.md`)
- Degradation finder → DA-CLIP restoration: conditions passes (evidence: `README.md`)
- DA-CLIP restoration → Result combining: produces outputs (evidence: `README.md`)
- Result combining → Restored image: merges into (evidence: `README.md`)
- DIV2K data → Data preparation: provides images (evidence: `README.md`)
- Restored image → Quality evaluation: compares with reference (evidence: `README.md`)
- DIV2K data → Quality evaluation: provides reference (evidence: `README.md`)
- Quality evaluation → PSNR SSIM LPIPS: reports (evidence: `README.md`)
- Degradation classification → Latent diffusion restoration: detects then restores (evidence: `README.md`)
