Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added README file and image files it references #541

Merged
merged 62 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
8a6eed7
Added README file and image files it references
Ian-Erickson Sep 29, 2023
d77e834
Testing if subscript implementation is correct before using it further.
Ian-Erickson Sep 29, 2023
850b0f3
Implemented proper subscript in instances of ML4Hseg and ML4Hreg
Ian-Erickson Sep 29, 2023
5fdca9c
Changed the title of the README in Deep learning to estimate cardiac …
Ian-Erickson Sep 29, 2023
651ba9f
Removed "attachment" tag to images and added .png to Lreg.
Ian-Erickson Sep 29, 2023
f6632db
Added additional line breaks so that the loss functions appeared on t…
Ian-Erickson Sep 29, 2023
851c231
Added line detailing the optimization of the models through the Adam …
Ian-Erickson Sep 29, 2023
4207d3b
Added link to Model architectures, trained weights, and more metrics
Ian-Erickson Sep 29, 2023
67daa1c
Moved location of model architectures, and other useful data to the f…
Ian-Erickson Sep 29, 2023
4422ce9
Added image comparing the three models and their results.
Ian-Erickson Sep 29, 2023
7c10e66
Added Results Section with images from the study.
Ian-Erickson Sep 29, 2023
ce09733
Removed the word "then".
Ian-Erickson Sep 29, 2023
903f373
Changed title of liver fat model into link.
Ian-Erickson Oct 3, 2023
df597e3
Added link to paper in the README of "Deep Learning to Predict Cardia…
Ian-Erickson Oct 3, 2023
a768e90
Made the title of "Estimating body fat distribution from silhouette i…
Ian-Erickson Oct 3, 2023
6cf664f
Fixed link in README of "Estimating body fat distribution from silhou…
Ian-Erickson Oct 3, 2023
d3e070a
Made the citation in the README of mi_feature_selection link to the p…
Ian-Erickson Oct 3, 2023
de2e4db
Made the link in the README of silhouette_IRL go to the article cited.
Ian-Erickson Oct 3, 2023
8a41145
Changed the link in the liver_fat_from_mri_ubk README to the correct …
Ian-Erickson Oct 3, 2023
5c02e4f
Did some minor edits in the README of left_ventricular_mass_from_ecg_…
Ian-Erickson Oct 3, 2023
ed37d9e
Did minor edits on the README of model_zoo/cardiac_mri_derived_left_v…
Ian-Erickson Oct 4, 2023
da0c1de
Added some info on the LVM-AI model.
Ian-Erickson Oct 4, 2023
de995a8
Changed the image link in Left_Ventricular_Mass....
Ian-Erickson Oct 4, 2023
5b86c12
Added image file depicting the training and Test Sets of LVM-AI. Had …
Ian-Erickson Oct 4, 2023
ee118a3
Attempted to decrease the size of the image in left_ventricular_mass_…
Ian-Erickson Oct 4, 2023
987dbc4
Undid previous changes.
Ian-Erickson Oct 4, 2023
81104fc
Updated readme to not use "we" as it does in the report. Also trimmed…
Ian-Erickson Oct 4, 2023
7d4c953
Further fixed grammar of README
Ian-Erickson Oct 4, 2023
17aa78f
Inserted Image of the model's layers into README
Ian-Erickson Oct 4, 2023
eabbc34
Changed link in cardiac_mri... README to be in HTML rather than Markdown
Ian-Erickson Oct 4, 2023
04d7ae7
Removed link in the title from silhouette_mri
Ian-Erickson Oct 4, 2023
652c750
Added sentence containing link to the paper on the model to several R…
Ian-Erickson Oct 4, 2023
40421a4
Fixed Links to original paper.
Ian-Erickson Oct 4, 2023
12361c6
Changed link to original paper in liver_fat README.
Ian-Erickson Oct 13, 2023
1128e92
Removed quotes in ecg_student README for consistency
Ian-Erickson Oct 13, 2023
5aa20b5
Added Git LFS tracking for images in cardiac_mri_derived...
Ian-Erickson Oct 13, 2023
4b4f3a4
Git removed files
Ian-Erickson Oct 13, 2023
86a90ba
Tried to revert changes
Ian-Erickson Oct 13, 2023
b82778f
Merge branch 'READMEs' of https://github.com/broadinstitute/ml4h into…
Ian-Erickson Oct 13, 2023
f7a62d9
renamed LSeg to Lseg
Ian-Erickson Oct 13, 2023
a326041
Updated Lseg reference in README
Ian-Erickson Oct 13, 2023
00d9c67
Having problems. One of the deleted images won't come back.
Ian-Erickson Oct 13, 2023
cfbe63f
Merge branch 'READMEs' of https://github.com/broadinstitute/ml4h into…
Ian-Erickson Oct 13, 2023
d98bde4
renamed Lseg again.
Ian-Erickson Oct 13, 2023
fe61378
Removed image as it no longer seems to exist.
Ian-Erickson Oct 13, 2023
cc9b8aa
Added git lfs tracking to loss function images
Ian-Erickson Oct 13, 2023
ae9cf1f
Added TrainingAndTestSets.jpg to git lfs
Ian-Erickson Oct 13, 2023
5340608
Adding test image to be removed using git rm.
Ian-Erickson Oct 16, 2023
92c2a25
Renamed test image so it's targetable with command.
Ian-Erickson Oct 16, 2023
bc145b8
Deleted TestImage.png
Ian-Erickson Oct 16, 2023
8a469b0
Attempted to get the loss of ML4Hseg displaying again.
Ian-Erickson Oct 16, 2023
154e268
Changed alt text of Lreg image
Ian-Erickson Oct 16, 2023
c02a68a
Changed the README to use LSeg.png
Ian-Erickson Oct 16, 2023
bb21c8e
Added lines between text and loss functions.
Ian-Erickson Oct 16, 2023
53b3c5f
Running git rm on LSeg.png.
Ian-Erickson Oct 16, 2023
d056cdb
Adding Lseg back in.
Ian-Erickson Oct 16, 2023
7585b2b
Updating Readme to use proper Lseg.png
Ian-Erickson Oct 16, 2023
e0161d3
Added git lfs tracking to images in liver_fat...
Ian-Erickson Oct 16, 2023
2800a66
Added lfs tracking to some images not already in .gitattributes.
Ian-Erickson Oct 16, 2023
bcc5911
fix
lucidtronix Oct 27, 2023
0ff7f89
fix
lucidtronix Oct 27, 2023
8adedf9
fix
lucidtronix Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ model_zoo/ECG2AF/km.jpg filter=lfs diff=lfs merge=lfs -text
model_zoo/ECG2AF/study_design.jpg filter=lfs diff=lfs merge=lfs -text
model_zoo/ECG2AF/architecture.png filter=lfs diff=lfs merge=lfs -text
model_zoo/ECG2AF/salience.jpg filter=lfs diff=lfs merge=lfs -text
model_zoo/cardiac_mri_derived_left_ventricular_mass/Lseg.png filter=lfs diff=lfs merge=lfs -text
model_zoo/cardiac_mri_derived_left_ventricular_mass/Lreg.png filter=lfs diff=lfs merge=lfs -text
model_zoo/left_ventricular_mass_from_ecg_student_and_mri_teacher/TrainingAndTestSets.jpg filter=lfs diff=lfs merge=lfs -text
model_zoo/liver_fat_from_mri_ukb/liver_fat_from_echo_teacher_model.png filter=lfs diff=lfs merge=lfs -text
model_zoo/liver_fat_from_mri_ukb/liver_fat_from_ideal_student_model.png filter=lfs diff=lfs merge=lfs -text
model_zoo/ECG_PheWAS/ukb_phewas.png filter=lfs diff=lfs merge=lfs -text
model_zoo/dropfuse/overview.png filter=lfs diff=lfs merge=lfs -text
Binary file modified model_zoo/ECG_PheWAS/ukb_phewas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions model_zoo/cardiac_mri_derived_left_ventricular_mass/Lreg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions model_zoo/cardiac_mri_derived_left_ventricular_mass/Lseg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions model_zoo/cardiac_mri_derived_left_ventricular_mass/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Deep learning to estimate cardiac magnetic resonance–derived left ventricular mass
This folder contains models and code supporting the work described in <a href= "https://www.sciencedirect.com/science/article/pii/S2666693621000232?ref=pdf_download&fr=RR-2&rr=80df2c704c374cd4">this paper</a> published in the Cardiovascular Digital Health Journal.

Within participants of the UK Biobank prospective cohort undergoing CMR, 2 convolutional neural networks were trained to estimate LV mass. The first (ML4H<sub>reg</sub>) performed regression informed by manually labeled LV mass (available in 5065 individuals), while the second (ML4Hseg) performed LV segmentation informed by InlineVF (version D13A) contours. All models were optimized using the Adam variant of stochastic gradient descent with initial learning rate 1 × 10-3, exponential learning rate decay, and batch size of 4 on K80 graphical processing units.
# ML4H<sub>reg</sub>
The first model is a 3D convolutional neural network regressor ML4H<sub>reg</sub> trained with the manually annotated LV mass estimates provided by Petersen and colleagues to optimize the log cosh loss function, which behaves like L2 loss for small values and L1 loss for larger values:

![Loss of ML4Hregs](Lreg.png)

Here batch size, N, was 4 random samples from the training set of 3178 after excluding testing and validation samples from the total 5065 CMR images with LV mass values included in P.
# ML4H<sub>seg</sub>
ML4H<sub>seg</sub>, is a 3D semantic
segmenter. To facilitate model development in the absence of hand-labeled segmentations, the models were trained with the InlineVF contours to minimize Lseg; the per-pixel cross-entropy between the label and the model’s prediction.

![Loss of ML4Hseg](Lseg.png)

Here the batch size, N, was 4 from the total set of 33,071. Height, H, and width, W, are 256 voxels and there was a maximum of 13 Z slices along the short axis. There is a channel for each of the 3 labels, which were one-hot encoded in the training data, InlineVF (IVF), and probabilistic values from the softmax layer of ML4H<sub>seg</sub>. Segmentation architectures used U-Net-style long-range connections between early convolutional layers and deeper layers. Since not all CMR images used the same pixel dimensions, models were built to incorporate pixel size values with their fully connected layers before making predictions.
# Results
The accuracy of both deep learning approaches wwere compared to LV mass obtained using InlineVF within an independent holdout set using manually labeled LV mass as the gold standard.
![Overview of left ventricular (LV) mass algorithms.](https://ars.els-cdn.com/content/image/1-s2.0-S2666693621000232-gr1.jpg)

Within 33,071 individuals who underwent CMR, models were trained to derive CMR-based LV mass using deep learning regression (ML4Hreg) and segmentation (ML4Hseg).
![Distributions of cardiac magnetic resonance (CMR)-derived left ventricular (LV) mass obtained using each estimation method.](https://ars.els-cdn.com/content/image/1-s2.0-S2666693621000232-gr2.jpg)

In an independent holdout set of 891 individuals with manually labeled LV mass estimates available, ML4Hseg had favorable correlation with manually labeled LV mass (r = 0.864, 95% confidence interval 0.847–0.880; MAE 10.41 g, 95% CI 9.82–10.99) as compared to ML4Hreg (r = 0.843, 95% confidence interval 0.823–0.861; MAE 10.51, 95% CI 9.86–11.15, P = .01) and centered InlineVF (r = 0.795, 95% confidence interval 0.770–0.818; MAE 14.30, 95% CI 13.46–11.01, P < .01)
![Correlation between manually labeled left ventricular (LV) mass and derived left ventricular mass estimated using each model. ](https://ars.els-cdn.com/content/image/1-s2.0-S2666693621000232-gr3.jpg)

This file was deleted.

Binary file modified model_zoo/dropfuse/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Deep Learning to Predict Cardiac Magnetic Resonance-Derived Left Ventricular Mass and Hypertrophy from 12-Lead Electrocardiograms
Three pre-trained models are included here. The model `ecg_rest_raw_age_sex_bmi_lvm_asymmetric_loss.h5` takes as input a 12 Lead resting ECG, as well as age, sex and BMI and has two outputs: one which regresses the left ventricular mass, and a second which gives a probability of left ventricular hypertrophy.
This model was trained with the asymmetric loss described in the paper. The model `ecg_rest_raw_lvm_asymmetric_loss.h5` takes only an ECG as input and regresses left ventricular mass, this model was also trained with the asymmetric loss.
The third model, `ecg_rest_raw_lvm_symmetric_loss.h5` takes only an ECG as input and regresses left ventricular mass, this model was trained with the symmetric logcosh loss. The raw voltage values from the ECG are normalized by dividing by 2000 prior to being input to the model.

This folder contains models and code supporting the work described in [this paper](https://www.ahajournals.org/doi/10.1161/CIRCIMAGING.120.012281?url_ver=Z39.88-2003&rfr_id=ori:rid:crossref.org&rfr_dat=cr_pub%20%200pubmed) published in the journal Circulation: Cardiovascular Imaging.

# LVM-AI
Left Ventricular Mass-Artificial Intelligence (LVM-AI) is a one-dimensional convolutional neural network trained to predict CMR-derived LV mass using 12-lead ECGs. LVM-AI was trained within 32239 individuals from the UK Biobank with paired CMR and 12-lead ECG. It was provided with the entire 10 seconds of the 12-lead ECG waveform as well as participant age, sex, and BMI.
LVM-AI was evaluated in a UK Biobank test set as well as an external health care–based Mass General Brigham (MGB) dataset. In both test sets, LVM-AI was compared to with traditional ECG-based rules for diagnosing CMR-derived left ventricular hypertrophy. Associations between LVM-AI predicted LV mass index and incident cardiovascular events were tested in the UK Biobank and a separate MGB-based ambulatory cohort (MGB outcomes)
![Overview of the training and test samples](TrainingAndTestSets.jpg)
When compared with any ECG rule, LVM-AI demonstrated similar LVH discrimination in the UK Biobank (LVM-AI c-statistic 0.653 [95% CI, 0.608 -0.698] versus any ECG rule c-statistic 0.618 [95% CI, 0.574 -0.663], P=0.11) and superior discrimination in MGB (0.621; 95% CI, 0.592 -0.649 versus 0.588; 95% CI, 0.564 -0.611, P=0.02).


# Models
Three pre-trained models are included here:
The model `ecg_rest_raw_age_sex_bmi_lvm_asymmetric_loss.h5` takes as input a 12 Lead resting ECG, as well as age, sex and BMI and has two outputs: one which regresses the left ventricular mass, and a second which gives a probability of left ventricular hypertrophy. This model was trained with the asymmetric loss described in the paper.
The model `ecg_rest_raw_lvm_asymmetric_loss.h5` takes only an ECG as input and regresses left ventricular mass. This model was also trained with the asymmetric loss.
The third model, `ecg_rest_raw_lvm_symmetric_loss.h5` takes only an ECG as input and regresses left ventricular mass. This model was trained with the symmetric logcosh loss. The raw voltage values from the ECG are normalized by dividing by 2000 prior to being input to the model.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion model_zoo/liver_fat_from_mri_ukb/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Machine learning enables new insights into clinical significance of and genetic contributions to liver fat accumulation

This folder contains models and code supporting the work described in [this paper](https://www.sciencedirect.com/science/article/pii/S2666979X21000823) published in Cell Genomics

Here we host two models for estimating liver fat from abdominal MRI.
The liver fat percentage training data is from the returned liver fat values in the [UK Biobank field ID 22402](https://biobank.ctsu.ox.ac.uk/crystal/field.cgi?id=22402). These values were only calculated for the echo protocol, so to infer liver fat from the ideal protocl we used a teacher/student modeling approach.

Expand All @@ -9,7 +11,7 @@ This model takes input of shape 160 x 160 x 10 and emits a scalar representing e
The input TensorMap is defined at `tensormap.ukb.mri.gre_mullti_echo_10_te_liver`.
The output TensorMap associated with these values is defined at `tensormap.ukb.mri.liver_fat`.
The keras model file is at [liver_fat_from_echo.h5](liver_fat_from_echo.h5) and the model architecture is shown below. The "?" in the input dimension represents the batch size of the input, which can be determined at runtime. When training the teacher model we used a batch size of 8.
![](liver_fat_from_echo_teacher_model.png)
![https://www.medrxiv.org/content/10.1101/2020.09.03.20187195v1](liver_fat_from_echo_teacher_model.png)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Student Model
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion model_zoo/mi_feature_selection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ xxx = pickle.load(open('models/coxnet_survival_05_final.pickle', 'rb'))

### Citation

**Selection of 51 predictors from 13,782 candidate multimodal features using machine learning improves coronary artery disease prediction**, Saaket Agrawal, BS*, Marcus D. R. Klarqvist, PhD, MSc, MSc*, Connor Emdin, DPhil, MD, Aniruddh P. Patel, MD, Manish D. Paranjpe, BA, Patrick T. Ellinor, MD, PhD, Anthony Philippakis, MD, PhD, Kenney Ng, PhD, Puneet Batra, PhD, Amit V. Khera, MD, MSc
**[Selection of 51 predictors from 13,782 candidate multimodal features using machine learning improves coronary artery disease prediction](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8672148/)**, Saaket Agrawal, BS*, Marcus D. R. Klarqvist, PhD, MSc, MSc*, Connor Emdin, DPhil, MD, Aniruddh P. Patel, MD, Manish D. Paranjpe, BA, Patrick T. Ellinor, MD, PhD, Anthony Philippakis, MD, PhD, Kenney Ng, PhD, Puneet Batra, PhD, Amit V. Khera, MD, MSc

2 changes: 1 addition & 1 deletion model_zoo/silhouette_mri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Several files are provided:

### Citation

**Estimating body fat distribution - a driver of cardiometabolic health - from silhouette images**, Marcus D. R. Klarqvist, PhD*, Saaket Agrawal, BS*, Nathaniel Diamant, BS, Patrick T. Ellinor, MD, PhD, Anthony Philippakis, MD, PhD, Kenney Ng, PhD, Puneet Batra, PhD, Amit V. Khera, MD
**[Estimating body fat distribution - a driver of cardiometabolic health - from silhouette images](https://www.medrxiv.org/content/10.1101/2022.01.14.22269328v2)**, Marcus D. R. Klarqvist, PhD*, Saaket Agrawal, BS*, Nathaniel Diamant, BS, Patrick T. Ellinor, MD, PhD, Anthony Philippakis, MD, PhD, Kenney Ng, PhD, Puneet Batra, PhD, Amit V. Khera, MD
Loading