Skip to content

Commit 7929172

Browse files
authored
Merge branch 'Project-MONAI:main' into vikash/fix/monai_1_6_release_notebooks
2 parents f2cb64a + 2ce5139 commit 7929172

3 files changed

Lines changed: 602 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ This tutorial demonstrates how to construct a training workflow of [HoVerNet](ht
235235
##### [Nuclei Classification](./pathology/nuclick#nuclei-classification-model)
236236
The notebook demonstrates examples of training and inference pipelines with interactive annotation for pathology, NuClick is used for delineating nuclei, cells and a squiggle for outlining glands.
237237

238+
#### <ins>**Multimodal**</ins>
239+
##### [Multimodal Early-Fusion Network](./multimodal/nakaseke_multimodal_early_fusion)
240+
An end-to-end tutorial fusing a 2D radiograph stream (MONAI `DenseNet121`) with a low-dimensional clinical tabular stream via dictionary-based transforms and `torch.cat`, using a fully synthetic, locally generated dataset.
241+
238242
#### <ins>**Acceleration**</ins>
239243
##### [fast_model_training_guide](./acceleration/fast_model_training_guide.md)
240244
The document introduces details of how to profile the training pipeline, how to analyze the dataset and select suitable algorithms, and how to optimize GPU utilization in single GPU, multi-GPUs or even multi-nodes.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Multimodal Early-Fusion Network: Radiographs + Clinical Tabular Data
2+
3+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Project-MONAI/tutorials/blob/main/multimodal/nakaseke_multimodal_early_fusion/multimodal_early_fusion_tutorial.ipynb)
4+
5+
This tutorial demonstrates an **early-fusion** architecture that combines a 2D medical image stream
6+
with a low-dimensional clinical tabular stream in a single MONAI dictionary-based pipeline, using
7+
[`multimodal_early_fusion_tutorial.ipynb`](./multimodal_early_fusion_tutorial.ipynb).
8+
9+
## Motivation
10+
11+
Most MONAI tutorials focus on a single imaging modality. In real deployments, especially in
12+
resource-constrained clinics, an image is rarely read in isolation -- a clinician also has vitals,
13+
labs, or a short structured history on hand, and a model that ignores that context is throwing away
14+
signal it doesn't have to. This tutorial shows the minimum end-to-end MONAI/PyTorch pattern for
15+
combining the two without hand-rolling a custom `Dataset`.
16+
17+
The clinical feature schema (age, BMI, salivary pH, systolic blood pressure) and the binary screening
18+
task are modeled after a hypertension-screening workflow explored at Nakaseke Hospital, Uganda. The
19+
underlying patient data is confidential and is **not** included in or downloaded by this tutorial.
20+
21+
## Dataset
22+
23+
**Fully synthetic, generated locally, no download required.** The notebook's
24+
`simulate_nakaseke_multimodal_dataset()` function creates, on the fly:
25+
26+
- one synthetic 2D radiograph per patient, saved as a NIfTI (`.nii.gz`) file with `nibabel`
27+
- a 4-dimensional tabular vector `[age, bmi, salivary_ph, systolic_bp]`
28+
- a binary label
29+
30+
Both modalities are generated from a shared hidden "risk factor" per patient, so neither the image
31+
nor the tabular vector is fully predictive of the label on its own -- this is what motivates fusing
32+
them. There is no claim that the notebook's results reflect real-world diagnostic performance; the
33+
synthetic cohort exists only to exercise the pipeline end-to-end without any real or downloadable
34+
data.
35+
36+
## What the notebook covers
37+
38+
1. Reproducible setup with `monai.utils.set_determinism`.
39+
2. Synthetic multimodal data generation and a MONAI-style data manifest
40+
(`{"image": ..., "nakaseke_tabular": ..., "label": ...}`).
41+
3. A dictionary-based `Compose` pipeline where image-only transforms (`LoadImaged`,
42+
`EnsureChannelFirstd`, `ScaleIntensityRanged`) touch only the `"image"` key, while the tabular and
43+
label keys are cast to tensors with `EnsureTyped` and otherwise left untouched.
44+
4. `ResilientMultimodalClassifier`: a MONAI `DenseNet121` visual stream (512-d embedding) fused via
45+
`torch.cat` with a small tabular projection stream (16-d embedding) into a 528-d representation,
46+
followed by a dropout-regularized classification head.
47+
5. A short training loop (`max_epochs`, `val_interval`) showing validation accuracy improve as the
48+
model learns to use both streams.
49+
50+
## Requirements
51+
52+
Everything needed is installed by the notebook's own `Setup environment` cell
53+
(`monai-weekly[nibabel, tqdm]`, `matplotlib`). No GPU is required -- the default image size (64x64)
54+
and cohort size (200 patients) are chosen to train in well under a minute on CPU.

0 commit comments

Comments
 (0)