Skip to content

[CS598 DL4H] ResNet1D-18 and Georgia ecg multilabel classification - #1729

Open
jaspalb2 wants to merge 14 commits into
sunlabuiuc:masterfrom
A-Wu5:pr/georgia-ecg
Open

jaspalb2 wants to merge 14 commits into
sunlabuiuc:masterfrom
A-Wu5:pr/georgia-ecg

Conversation

@jaspalb2

@jaspalb2 jaspalb2 commented Nov 29, 2026 •

Copy link
Copy Markdown

Contributors

  • Jaspal Bainiwal, netid: jaspalb2
  • Anthony Wu, netid: adwu3
  • Pengshao Ye, netid: py12

Contribution type

Model and task contribution using the existing CardiologyDataset.

Paper

In-depth Benchmarking of Deep Neural Network Architectures for ECG Diagnosis

What we added

We added resnet1d-18 and a task for predicting 30 diagnosis labels from Georgia ecg recordings.

The preprocessing reads 12 lead signals at 500 Hz in mv. It pads shorter recordings with zeros on the left to reach 5k samples, then normalizes each lead using training-set statistics.

Training uses random 1250 sample windows. Evaluation uses overlapping windows and combines their predictions using max, mean, or top-two mean aggregation. The loader matches recordings to the saved splits by recording ID and keeps the same diagnosis label order throughout.

Files to review

File Purpose
pyhealth/models/resnet1d_18.py Model implementation
pyhealth/models/__init__.py model export
pyhealth/tasks/georgia_ecg.py preprocessing, classification task, and data loader
docs/api/models/pyhealth.models.ResNet1D18.rst Model doc
docs/api/tasks/pyhealth.tasks.georgia_ecg.rst Task doc
docs/api/models.rst Model doc index
docs/api/tasks.rst Task doc index
tests/core/test_resnet1d_18.py 6 synthetic model tests
tests/core/test_georgia_ecg.py 12 synthetic preprocessing and task tests
examples/georgia_ecg_classification_resnet1d18.py Training, evaluation, and aggregation comparison

You can run the example with --synthetic without downloading georgia data.

Tests

After rebasing onto upstream master, all six model tests passed in 0.065 seconds and all twelve task tests passed in 0.016 seconds.

The model tests check initialization, output shapes, probabilities, loss, inference without labels, gradients, and invalid input channels.

The task tests check normalization, padding, training and evaluation windows, label ordering, dataset wrappers, and invalid inputs.

We also ran the synthetic example successfully before the rebase. Its scores demonstrate that the example runs. They are not georgia benchmark results.

Results

We completed a separate Colab run using the gain 1000 Georgia data and verified that the pooled normalized training signals had mean 0 and standard deviation 1 per lead.

We used seed 1 with 8260 training, 1038 validation, and 1046 test recordings.

Validation selected the epoch 45 checkpoint with max agg macro roc auc of 0.895902. Training stopped at epochs 70.

Aggregation Test macro roc-auc delta vs. max
Max 0.887990 0.000000
Mean 0.890345 0.002355
Top two mean 0.889806 0.001816

Mean performed best in this run, but one seed does not establish statistical significance.

Data and experiment notes

To run with real data, install wfdb and provide the georgia recordings and these preprocessing files:

  • label_order.json
  • split_seed1.npz
  • normalization_seed1.npz

The synthetic example runs without downloading the Georgia dataset. The corrected gain 1000 experiment and aggregation results are summarized above.

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Test Coverage

Total: 88.27% (58343 / 66093 lines)

Modified file Coverage Lines
pyhealth/datasets/__init__.py 100.00% 92 / 92
pyhealth/datasets/hirid.py 100.00% 32 / 32
pyhealth/metrics/labtop.py 98.61% 71 / 72
pyhealth/models/__init__.py 100.00% 124 / 124
pyhealth/models/labram.py 98.81% 250 / 253
pyhealth/models/labtop.py 94.87% 37 / 39
pyhealth/models/resnet1d_18.py 85.14% 63 / 74
pyhealth/models/salientsleepnet.py 99.35% 152 / 153
pyhealth/tasks/__init__.py 98.58% 139 / 141
pyhealth/tasks/georgia_ecg.py 72.73% 120 / 165
pyhealth/tasks/labtop.py 96.60% 199 / 206
pyhealth/tasks/tuh_referential_tasks.py 100.00% 37 / 37

Workflow run · d45a903

@solarsys solarsys added the status: manual Pending maintainer's review label Nov 30, 2026
@solarsys

Copy link
Copy Markdown
Collaborator

Why this PR has status: manual:

To make it eligible: remove the notebook (a short example script under examples/ is enough). Reuse an existing ResNet1D instead of adding another. Keep the Georgia ECG task, which is new. Then we'll switch the label to status: automatic and request an AI review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: manual Pending maintainer's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants