# ccml1/xraypulmonar architecture

> Architecture diagram of the GitHub repository ccml1/xraypulmonar, 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/ccml1/xraypulmonar
- Repository: https://github.com/ccml1/xraypulmonar

## Overview

This repository is a Colab-style workflow for training and evaluating a binary chest-X-ray pneumonia classifier. The main path downloads the Kaggle dataset, prepares image batches, trains a CNN, evaluates it on validation images, and exports a model. The only sampled source is the notebook-export script; the README is empty, and the HTML/model artifacts were not inspected, so their relationships to the workflow are not asserted.

Main entry points: [`analisispaper2final.py`](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py) (Dataset download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_download["Dataset download"]
  node_generators["Image generators"]
end

subgraph group_model["Classifier workflow"]
  node_cnn["CNN classifier"]
  node_fit["Model training"]
end

subgraph group_output["Evaluation and export"]
  node_validation["Validation images"]
  node_metrics["Evaluation metrics"]
  node_export["Model export"]
end

node_user(("Notebook user"))
node_kaggle[("Kaggle dataset")]

node_user -->|"runs workflow"| node_download
node_download -->|"downloads dataset"| node_kaggle
node_download -->|"supplies directories"| node_generators
node_generators -->|"provides batches"| node_fit
node_fit -->|"trains model"| node_cnn
node_validation -->|"provides predictions"| node_cnn
node_cnn -->|"supplies predictions"| node_metrics
node_fit -->|"exports model"| node_export

click node_download "https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py"
click node_generators "https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py"
click node_cnn "https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py"
click node_fit "https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py"
click node_validation "https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py"
click node_metrics "https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py"
click node_export "https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.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_download,node_generators,node_user toneBlue
class node_cnn,node_fit,node_kaggle toneAmber
class node_validation,node_metrics,node_export toneMint
```

## Components

### Data preparation

- [Dataset download](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py): `analisispaper2final.py`
- [Image generators](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py): `analisispaper2final.py`

### Classifier workflow

- [CNN classifier](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py): `analisispaper2final.py`
- [Model training](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py): `analisispaper2final.py`

### Evaluation and export

- [Validation images](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py): `analisispaper2final.py`
- [Evaluation metrics](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py): `analisispaper2final.py`
- [Model export](https://github.com/ccml1/xraypulmonar/blob/main/analisispaper2final.py): `analisispaper2final.py`

### Other components

- **Notebook user**
- **Kaggle dataset**

## Connections

- Notebook user → Dataset download: runs workflow (evidence: `analisispaper2final.py`)
- Dataset download → Kaggle dataset: downloads dataset (evidence: `analisispaper2final.py`)
- Dataset download → Image generators: supplies directories (evidence: `analisispaper2final.py`)
- Image generators → Model training: provides batches (evidence: `analisispaper2final.py`)
- Model training → CNN classifier: trains model (evidence: `analisispaper2final.py`)
- Validation images → CNN classifier: provides predictions (evidence: `analisispaper2final.py`)
- CNN classifier → Evaluation metrics: supplies predictions (evidence: `analisispaper2final.py`)
- Model training → Model export: exports model (evidence: `analisispaper2final.py`)
