# udaykumar5683/image-restoration-and-enhancement-system architecture

> Architecture diagram of the GitHub repository udaykumar5683/image-restoration-and-enhancement-system, 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/udaykumar5683/image-restoration-and-enhancement-system
- Repository: https://github.com/udaykumar5683/image-restoration-and-enhancement-system

## Overview

The product is a Flask image-enhancement web application: users provide images, the application analyzes lighting, selects a correction path, and returns enhanced images. The README documents low-light, normal, and overexposed paths plus shared image-processing stages. The sampled Flask source shows enhancement helpers and an optional overexposure-model integration; the README supports the broader routing and result workflow, but route-level wiring is only partially visible in the excerpts.

Main entry points: [`image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py) (Flask application), [`image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html`](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html) (Web pages), [`image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py`](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py) (Image preprocessing), [`image/clear-image-enhacement/Overexposure Correction/main.py`](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/Overexposure%20Correction/main.py) (Exposure model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_flask["Flask application<br/>[app.py]"]
  node_webpages["Web pages<br/>[index.html]"]
end

subgraph group_routing["Analysis and routing"]
  node_quality["Quality analysis<br/>[main.py]"]
  node_preprocess["Image preprocessing<br/>[main.py]"]
end

subgraph group_enhance["Enhancement paths"]
  node_lowlight["Low-light correction<br/>[app.py]"]
  node_zerodce["Zero-DCE model<br/>[app.py]"]
  node_overexposure["Overexposure correction<br/>[app.py]"]
  node_normal["Normal-image path<br/>[main.py]"]
  node_clahe["CLAHE enhancement<br/>[app.py]"]
  node_contrast["Contrast enhancement<br/>[app.py]"]
  node_color["Color balance<br/>[app.py]"]
  node_denoise["Noise reduction<br/>[app.py]"]
end

subgraph group_results["Image results"]
  node_files["Uploaded and result images<br/>[app.py]"]
  node_output["Enhanced image display<br/>[index.html]"]
end

subgraph group_exposure["Exposure model"]
  node_exposuremodel["Exposure model<br/>[main.py]"]
end

node_user(("Image user"))

node_user -->|"opens"| node_webpages
node_webpages -->|"submits image"| node_flask
node_flask -->|"stores upload"| node_files
node_flask -->|"preprocesses"| node_preprocess
node_preprocess -->|"analyzes"| node_quality
node_flask -->|"routes by lighting"| node_quality
node_flask -->|"selects low-light"| node_lowlight
node_lowlight -->|"enhances"| node_zerodce
node_flask -->|"selects normal"| node_normal
node_flask -->|"selects overexposed"| node_overexposure
node_overexposure -->|"runs inference"| node_exposuremodel
node_lowlight -->|"continues enhancement"| node_clahe
node_normal -->|"enhances"| node_clahe
node_overexposure -->|"continues enhancement"| node_clahe
node_clahe -->|"enhances contrast"| node_contrast
node_contrast -->|"balances color"| node_color
node_contrast -->|"reduces noise"| node_denoise
node_color -->|"reduces noise"| node_denoise
node_denoise -->|"saves result"| node_files
node_flask -->|"serves result"| node_output
node_output -->|"shows image"| node_user

click node_flask "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_webpages "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html"
click node_quality "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py"
click node_preprocess "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py"
click node_lowlight "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_zerodce "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_overexposure "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_exposuremodel "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/Overexposure%20Correction/main.py"
click node_normal "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py"
click node_clahe "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_contrast "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_color "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_denoise "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_files "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py"
click node_output "https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html"

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_flask,node_webpages,node_user toneBlue
class node_quality,node_preprocess toneAmber
class node_lowlight,node_zerodce,node_overexposure,node_normal,node_clahe,node_contrast,node_color,node_denoise toneMint
class node_files,node_output toneRose
class node_exposuremodel toneIndigo
```

## Components

### Web interface

- [Flask application](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Web pages](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html): `image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html`

### Analysis and routing

- [Quality analysis](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py`
- [Image preprocessing](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py`

### Enhancement paths

- [Low-light correction](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Zero-DCE model](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Overexposure correction](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Normal-image path](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/main.py`
- [CLAHE enhancement](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Contrast enhancement](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Color balance](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Noise reduction](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`

### Image results

- [Uploaded and result images](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py): `image/clear-image-enhacement/IMAGE-ENHACEMENT/app.py`
- [Enhanced image display](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html): `image/clear-image-enhacement/IMAGE-ENHACEMENT/templates/index.html`

### Exposure model

- [Exposure model](https://github.com/udaykumar5683/image-restoration-and-enhancement-system/blob/main/image/clear-image-enhacement/Overexposure%20Correction/main.py): `image/clear-image-enhacement/Overexposure Correction/main.py`

### Other components

- **Image user**

## Connections

- Image user → Web pages: opens
- Web pages → Flask application: submits image
- Flask application → Uploaded and result images: stores upload
- Flask application → Image preprocessing: preprocesses
- Image preprocessing → Quality analysis: analyzes
- Flask application → Quality analysis: routes by lighting
- Flask application → Low-light correction: selects low-light
- Low-light correction → Zero-DCE model: enhances
- Flask application → Normal-image path: selects normal
- Flask application → Overexposure correction: selects overexposed
- Overexposure correction → Exposure model: runs inference
- Low-light correction → CLAHE enhancement: continues enhancement
- Normal-image path → CLAHE enhancement: enhances
- Overexposure correction → CLAHE enhancement: continues enhancement
- CLAHE enhancement → Contrast enhancement: enhances contrast
- Contrast enhancement → Color balance: balances color
- Contrast enhancement → Noise reduction: reduces noise
- Color balance → Noise reduction: reduces noise
- Noise reduction → Uploaded and result images: saves result
- Flask application → Enhanced image display: serves result
- Enhanced image display → Image user: shows image
