# abdullah374/dentxai architecture

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

- Interactive diagram: https://gitdiagram.com/abdullah374/dentxai
- Repository: https://github.com/abdullah374/dentxai

## Overview

DentXAI’s implemented workflow is a small Streamlit dental-image detector: a user uploads an image, the app runs YOLO inference with a confidence threshold, displays annotated output, saves it, and offers a download. The README describes additional classification, explainability, batch, and evaluation capabilities, but the supplied tree and source excerpt do not show their implementation, so they are not mapped here.

Main entry points: [`app.py`](https://github.com/abdullah374/dentxai/blob/main/app.py) (Streamlit app), [`outputs`](https://github.com/abdullah374/dentxai/tree/main/outputs) (Annotated output files), [`runs/detect/intraoral/weights/best.pt`](https://github.com/abdullah374/dentxai/blob/main/runs/detect/intraoral/weights/best.pt) (Trained weights), [`uploads`](https://github.com/abdullah374/dentxai/tree/main/uploads) (Uploaded images)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Dental professional"))
node_app["Streamlit app<br/>[app.py]"]
node_weights["Trained weights<br/>[best.pt]"]
node_yolo["Ultralytics YOLO"]
node_uploads["Uploaded images"]
node_pil["PIL image conversion"]
node_outputs["Annotated output files"]

node_user -->|"uploads image"| node_app
node_app -->|"loads weights"| node_weights
node_app -->|"creates model"| node_yolo
node_app -->|"writes upload"| node_uploads
node_app -->|"runs prediction"| node_yolo
node_yolo -->|"returns detections"| node_app
node_app -->|"plots detections"| node_yolo
node_app -->|"converts image"| node_pil
node_app -->|"saves result"| node_outputs
node_app -->|"reads result"| node_outputs
node_app -->|"shows and offers download"| node_user

click node_app "https://github.com/abdullah374/dentxai/blob/main/app.py"
click node_weights "https://github.com/abdullah374/dentxai/blob/main/runs/detect/intraoral/weights/best.pt"
click node_uploads "https://github.com/abdullah374/dentxai/tree/main/uploads"
click node_outputs "https://github.com/abdullah374/dentxai/tree/main/outputs"

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_user,node_yolo,node_pil toneIndigo
class node_app,node_weights,node_uploads,node_outputs toneTeal
```

## Components

### Other components

- **Dental professional**
- [Streamlit app](https://github.com/abdullah374/dentxai/blob/main/app.py): `app.py`
- [Trained weights](https://github.com/abdullah374/dentxai/blob/main/runs/detect/intraoral/weights/best.pt): `runs/detect/intraoral/weights/best.pt`
- **Ultralytics YOLO**
- [Uploaded images](https://github.com/abdullah374/dentxai/tree/main/uploads): `uploads`
- **PIL image conversion**
- [Annotated output files](https://github.com/abdullah374/dentxai/tree/main/outputs): `outputs`

## Connections

- Dental professional → Streamlit app: uploads image (evidence: `app.py`)
- Streamlit app → Trained weights: loads weights (evidence: `app.py`)
- Streamlit app → Ultralytics YOLO: creates model (evidence: `app.py`)
- Streamlit app → Uploaded images: writes upload (evidence: `app.py`)
- Streamlit app → Ultralytics YOLO: runs prediction (evidence: `app.py`)
- Ultralytics YOLO → Streamlit app: returns detections (evidence: `app.py`)
- Streamlit app → Ultralytics YOLO: plots detections (evidence: `app.py`)
- Streamlit app → PIL image conversion: converts image (evidence: `app.py`)
- Streamlit app → Annotated output files: saves result (evidence: `app.py`)
- Streamlit app → Annotated output files: reads result (evidence: `app.py`)
- Streamlit app → Dental professional: shows and offers download (evidence: `app.py`)
