# dhilipsanjay/detection-of-sensitive-data-exposure-in-images architecture

> Architecture diagram of the GitHub repository dhilipsanjay/detection-of-sensitive-data-exposure-in-images, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images
- Repository: https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images

## Overview

This repository provides a web application for warning users when images contain sensitive information. The documented workflow combines image classification with OCR-derived text classification, then fuses both results into a sensitivity decision. The README describes these stages but no source excerpts were available, so the graph uses documented relationships only; implementation details such as where fusion occurs are uncertain.

Main entry points: [`webapp/public/assets/script.js`](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/assets/script.js) (Classification workflow), [`webapp/public/index.html`](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/index.html) (Web interface), [`webapp/public/models/image_model/model.json`](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/image_model/model.json) (Image classifier), [`webapp/public/models/text_model/model.json`](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/text_model/model.json) (Text classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_interface["Web interface<br/>[index.html]"]
  node_workflow["Classification workflow<br/>[script.js]"]
  node_warning["Sensitivity result<br/>[index.html]"]
end

subgraph group_analysis["Image and text analysis"]
  node_image["Image classifier<br/>[model.json]"]
  node_ocr["Tesseract OCR"]
  node_text["Text classifier<br/>[model.json]"]
  node_fusion["Result fusion<br/>[script.js]"]
end

subgraph group_artifacts["Model artifacts"]
  node_wordindex["Text word index<br/>[word_index.json]"]
end

node_user(("User"))

node_user -->|"submits image"| node_interface
node_interface -->|"starts analysis"| node_workflow
node_workflow -->|"classifies image"| node_image
node_workflow -->|"extracts text"| node_ocr
node_workflow -->|"classifies text"| node_text
node_workflow -.->|"uses vocabulary"| node_wordindex
node_workflow -->|"combines results"| node_fusion
node_fusion -->|"produces decision"| node_warning
node_warning -->|"warns user"| node_user

click node_interface "https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/index.html"
click node_workflow "https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/assets/script.js"
click node_image "https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/image_model/model.json"
click node_text "https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/text_model/model.json"
click node_wordindex "https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/text_model/word_index.json"
click node_fusion "https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/assets/script.js"
click node_warning "https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/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_interface,node_workflow,node_warning,node_user toneBlue
class node_image,node_ocr,node_text,node_fusion toneAmber
class node_wordindex toneMint
```

## Components

### Web application

- [Web interface](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/index.html): `webapp/public/index.html`
- [Classification workflow](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/assets/script.js): `webapp/public/assets/script.js`
- [Sensitivity result](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/index.html): `webapp/public/index.html`

### Image and text analysis

- [Image classifier](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/image_model/model.json): `webapp/public/models/image_model/model.json`
- **Tesseract OCR**
- [Text classifier](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/text_model/model.json): `webapp/public/models/text_model/model.json`
- [Result fusion](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/assets/script.js): `webapp/public/assets/script.js`

### Model artifacts

- [Text word index](https://github.com/dhilipsanjay/detection-of-sensitive-data-exposure-in-images/blob/main/webapp/public/models/text_model/word_index.json): `webapp/public/models/text_model/word_index.json`

### Other components

- **User**

## Connections

- User → Web interface: submits image (evidence: `README.md`)
- Web interface → Classification workflow: starts analysis (evidence: `README.md`)
- Classification workflow → Image classifier: classifies image (evidence: `README.md`)
- Classification workflow → Tesseract OCR: extracts text (evidence: `README.md`)
- Classification workflow → Text classifier: classifies text (evidence: `README.md`)
- Classification workflow → Text word index: uses vocabulary
- Classification workflow → Result fusion: combines results (evidence: `README.md`)
- Result fusion → Sensitivity result: produces decision (evidence: `README.md`)
- Sensitivity result → User: warns user (evidence: `README.md`)
