# jan-dyndor/alzheimer-mri-detection architecture

> Architecture diagram of the GitHub repository jan-dyndor/alzheimer-mri-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jan-dyndor/alzheimer-mri-detection
- Repository: https://github.com/jan-dyndor/alzheimer-mri-detection

## Overview

This repository is a notebook-based research project for classifying Alzheimer’s disease from brain MRI scans. Its documented workflow prepares MRI data, compares patient-level and leakage-prone splits, trains CNNs across augmentation and classification variants, and evaluates their results. The README describes these stages and experiments, but the notebook source was not available for inspection; links therefore reflect documented data flow rather than verified function calls.

Main entry points: [`notebooks/alzheimer-detection-using-mri-scans.ipynb`](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preparation["Data preparation"]
  node_mri_dataset["MRI dataset"]
  node_image_prep["Image preprocessing"]
  node_patient_split["Patient-level split"]
  node_augmentation["Image augmentation"]
end

subgraph group_experiments["Model experiments"]
  node_four_class["Four-class task"]
  node_binary_task["Binary task"]
  node_resnet["ResNet50"]
  node_vgg["VGG16"]
  node_efficientnet["EfficientNetB4"]
  node_training["Model training"]
  node_leakage_trial["Leakage experiment"]
end

subgraph group_evaluation["Evaluation"]
  node_metrics["Model evaluation"]
  node_comparison["Results comparison"]
end

node_researcher(("Researcher"))
node_notebook["Research notebook"]

node_researcher -->|"runs"| node_notebook
node_mri_dataset -->|"MRI images"| node_image_prep
node_image_prep -->|"prepared images"| node_patient_split
node_patient_split -->|"training images"| node_augmentation
node_patient_split -->|"four labels"| node_four_class
node_patient_split -->|"binary labels"| node_binary_task
node_four_class -->|"task setup"| node_training
node_binary_task -->|"task setup"| node_training
node_augmentation -->|"augmented inputs"| node_training
node_resnet -->|"backbone"| node_training
node_vgg -->|"backbone"| node_training
node_efficientnet -->|"backbone"| node_training
node_patient_split -->|"non-patient split"| node_leakage_trial
node_training -->|"predictions"| node_metrics
node_leakage_trial -->|"predictions"| node_metrics
node_metrics -->|"metrics"| node_comparison

click node_notebook "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_image_prep "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_patient_split "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_augmentation "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_four_class "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_binary_task "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_resnet "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_vgg "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_efficientnet "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_training "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_leakage_trial "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_metrics "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb"
click node_comparison "https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.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_mri_dataset,node_image_prep,node_patient_split,node_augmentation toneBlue
class node_four_class,node_binary_task,node_resnet,node_vgg,node_efficientnet,node_training,node_leakage_trial toneAmber
class node_metrics,node_comparison toneMint
class node_researcher toneIndigo
class node_notebook toneTeal
```

## Components

### Data preparation

- **MRI dataset**
- [Image preprocessing](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [Patient-level split](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [Image augmentation](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`

### Model experiments

- [Four-class task](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [Binary task](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [ResNet50](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [VGG16](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [EfficientNetB4](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [Model training](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [Leakage experiment](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`

### Evaluation

- [Model evaluation](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`
- [Results comparison](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`

### Other components

- **Researcher**
- [Research notebook](https://github.com/jan-dyndor/alzheimer-mri-detection/blob/main/notebooks/alzheimer-detection-using-mri-scans.ipynb): `notebooks/alzheimer-detection-using-mri-scans.ipynb`

## Connections

- Researcher → Research notebook: runs
- MRI dataset → Image preprocessing: MRI images
- Image preprocessing → Patient-level split: prepared images
- Patient-level split → Image augmentation: training images
- Patient-level split → Four-class task: four labels
- Patient-level split → Binary task: binary labels
- Four-class task → Model training: task setup
- Binary task → Model training: task setup
- Image augmentation → Model training: augmented inputs
- ResNet50 → Model training: backbone
- VGG16 → Model training: backbone
- EfficientNetB4 → Model training: backbone
- Patient-level split → Leakage experiment: non-patient split
- Model training → Model evaluation: predictions
- Leakage experiment → Model evaluation: predictions
- Model evaluation → Results comparison: metrics
