# chrispathway/covid-ct-classifier architecture

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

- Interactive diagram: https://gitdiagram.com/chrispathway/covid-ct-classifier
- Repository: https://github.com/chrispathway/covid-ct-classifier

## Overview

This repository is a notebook-based COVID-19 CT-slice classifier. Its main workflow prepares and splits labeled images, trains and evaluates a fine-tuned MobileNetV3-Large, saves a checkpoint, and uses trained weights for single-image predictions. The README documents these stages and capabilities; the only sampled source file is requirements.txt, so implementation-level call relationships cannot be verified.

Main entry points: [`classifier.ipynb`](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb) (Model training), [`outputs/checkpoints/mobilenet_v3_large.pth`](https://github.com/chrispathway/covid-ct-classifier/blob/main/outputs/checkpoints/mobilenet_v3_large.pth) (Trained weights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Image data"]
  node_images[("CT slices")]
  node_split["Dataset split<br/>[classifier.ipynb]"]
  node_preprocess["Image transforms<br/>[classifier.ipynb]"]
  node_augment["Training augmentation<br/>[classifier.ipynb]"]
end

subgraph group_ml["Model and training"]
  node_model["MobileNetV3 model<br/>[classifier.ipynb]"]
  node_training["Model training<br/>[classifier.ipynb]"]
  node_checkpoint["Trained weights"]
end

subgraph group_use["Evaluation and inference"]
  node_evaluation["Split evaluation<br/>[classifier.ipynb]"]
  node_inference["Slice prediction<br/>[classifier.ipynb]"]
  node_classes["Class probabilities"]
end

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

node_kaggle -->|"provides images"| node_images
node_images -->|"split by class"| node_split
node_split -->|"feeds transforms"| node_preprocess
node_preprocess -->|"adds training crops"| node_augment
node_user -->|"runs notebook"| node_training
node_training -->|"fine-tunes"| node_model
node_training -->|"saves weights"| node_checkpoint
node_training -->|"evaluates splits"| node_evaluation
node_user -->|"provides slice"| node_inference
node_checkpoint -->|"loads weights"| node_inference
node_inference -->|"runs model"| node_model
node_inference -->|"returns probabilities"| node_classes

click node_split "https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb"
click node_preprocess "https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb"
click node_augment "https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb"
click node_model "https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb"
click node_training "https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb"
click node_checkpoint "https://github.com/chrispathway/covid-ct-classifier/blob/main/outputs/checkpoints/mobilenet_v3_large.pth"
click node_evaluation "https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb"
click node_inference "https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb"

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_images,node_split,node_preprocess,node_augment,node_user toneBlue
class node_model,node_training,node_checkpoint,node_kaggle toneAmber
class node_evaluation,node_inference,node_classes toneMint
```

## Components

### Image data

- **CT slices**
- [Dataset split](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb): `classifier.ipynb`
- [Image transforms](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb): `classifier.ipynb`
- [Training augmentation](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb): `classifier.ipynb`

### Model and training

- [MobileNetV3 model](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb): `classifier.ipynb`
- [Model training](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb): `classifier.ipynb`
- [Trained weights](https://github.com/chrispathway/covid-ct-classifier/blob/main/outputs/checkpoints/mobilenet_v3_large.pth): `outputs/checkpoints/mobilenet_v3_large.pth`

### Evaluation and inference

- [Split evaluation](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb): `classifier.ipynb`
- [Slice prediction](https://github.com/chrispathway/covid-ct-classifier/blob/main/classifier.ipynb): `classifier.ipynb`
- **Class probabilities**

### Other components

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

## Connections

- Kaggle dataset → CT slices: provides images (evidence: `README.md`)
- CT slices → Dataset split: split by class (evidence: `README.md`)
- Dataset split → Image transforms: feeds transforms (evidence: `README.md`)
- Image transforms → Training augmentation: adds training crops (evidence: `README.md`)
- Notebook user → Model training: runs notebook (evidence: `README.md`)
- Model training → MobileNetV3 model: fine-tunes (evidence: `README.md`)
- Model training → Trained weights: saves weights (evidence: `README.md`)
- Model training → Split evaluation: evaluates splits (evidence: `README.md`)
- Notebook user → Slice prediction: provides slice (evidence: `README.md`)
- Trained weights → Slice prediction: loads weights (evidence: `README.md`)
- Slice prediction → MobileNetV3 model: runs model (evidence: `README.md`)
- Slice prediction → Class probabilities: returns probabilities (evidence: `README.md`)
