# asthajaiswal312/federated-cervical-imaging architecture

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

- Interactive diagram: https://gitdiagram.com/asthajaiswal312/federated-cervical-imaging
- Repository: https://github.com/asthajaiswal312/federated-cervical-imaging

## Overview

This repository provides a Streamlit cervical-image screening interface: a user uploads an image, requests a prediction, and receives a downloadable clinical summary. The app preprocesses the image, runs a MobileNetV3 model using the supplied checkpoint, and maps the predicted class to explanatory text and advice. Although the README describes federated, privacy-preserving diagnostics, the sampled runtime shows local inference—not federated training or communication. Its class profiles provide interpretation text, but no feature-attribution XAI is visible.

Main entry points: [`app/app.py`](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py) (MobileNet classifier), [`app/federated_cervical_model.pth`](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/federated_cervical_model.pth) (Model checkpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Screening interface"]
  node_portal["Upload portal<br/>[app.py]"]
end

subgraph group_inference["Image inference"]
  node_image["Image preprocessing<br/>[app.py]"]
  node_model["MobileNet classifier<br/>[app.py]"]
  node_checkpoint["Model checkpoint"]
end

subgraph group_results["Clinical results"]
  node_profiles["Class profiles<br/>[app.py]"]
  node_dashboard["Results dashboard<br/>[app.py]"]
  node_report["Downloadable report<br/>[app.py]"]
end

node_user(("Screening user"))

node_user -->|"uploads image"| node_portal
node_portal -->|"preprocesses image"| node_image
node_image -->|"supplies tensor"| node_model
node_model -->|"loads weights"| node_checkpoint
node_model -->|"selects class profile"| node_profiles
node_profiles -->|"provides interpretation"| node_dashboard
node_dashboard -->|"renders report"| node_report
node_user -->|"downloads report"| node_report

click node_portal "https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py"
click node_image "https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py"
click node_model "https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py"
click node_checkpoint "https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/federated_cervical_model.pth"
click node_profiles "https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py"
click node_dashboard "https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py"
click node_report "https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py"

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_portal,node_user toneBlue
class node_image,node_model,node_checkpoint toneAmber
class node_profiles,node_dashboard,node_report toneMint
```

## Components

### Screening interface

- [Upload portal](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py): `app/app.py`

### Image inference

- [Image preprocessing](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py): `app/app.py`
- [MobileNet classifier](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py): `app/app.py`
- [Model checkpoint](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/federated_cervical_model.pth): `app/federated_cervical_model.pth`

### Clinical results

- [Class profiles](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py): `app/app.py`
- [Results dashboard](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py): `app/app.py`
- [Downloadable report](https://github.com/asthajaiswal312/federated-cervical-imaging/blob/main/app/app.py): `app/app.py`

### Other components

- **Screening user**

## Connections

- Screening user → Upload portal: uploads image (evidence: `app/app.py`)
- Upload portal → Image preprocessing: preprocesses image (evidence: `app/app.py`)
- Image preprocessing → MobileNet classifier: supplies tensor (evidence: `app/app.py`)
- MobileNet classifier → Model checkpoint: loads weights (evidence: `app/app.py`)
- MobileNet classifier → Class profiles: selects class profile (evidence: `app/app.py`)
- Class profiles → Results dashboard: provides interpretation (evidence: `app/app.py`)
- Results dashboard → Downloadable report: renders report (evidence: `app/app.py`)
- Screening user → Downloadable report: downloads report (evidence: `app/app.py`)
