Diff of /README.md [000000] .. [6a4082]

Switch to unified view

a b/README.md
1
# Prediction of total knee replacement using deep learning analysis of knee MRI
2
3
## Project Overview
4
This project implements deep learning models to predict total knee replacement using MRI analysis. Our models achieve up to 0.90 AUC using a combination of MRI and radiograph data, significantly outperforming traditional methods. The implementation supports multiple MRI sequence types (DESS, IW-TSE, T1-TSE) and includes a novel multi-input model architecture.
5
6
## Table of Contents
7
- [Prerequisites](#prerequisites)
8
- [Installation](#installation)
9
- [Model Weights](#model-weights)
10
- [Data Preparation](#data-preparation)
11
- [Usage](#usage)
12
  - [DESS Sequence](#dess-sequence)
13
  - [IW-TSE Sequence](#iw-tse-sequence)
14
  - [T1-TSE Sequence](#t1-tse-sequence)
15
  - [Multi-Input Model](#multi-input-model)
16
- [Results](#results)
17
- [Citation](#citation)
18
19
## Prerequisites
20
- Python 3.6
21
- CUDA-compatible GPU (recommended)
22
- HDF5 dataset files
23
- Required Python packages (install via `environment.yaml`)
24
25
## Installation
26
1. Clone this repository:
27
```bash
28
git clone https://github.com/denizlab/OAI-MRI-TKR.git
29
```
30
31
2. Set up the Python environment:
32
```bash
33
conda env create -f environment.yaml
34
conda activate tkr_mri_env
35
```
36
37
## Model Weights
38
Pre-trained weights from our 7-fold nested cross-validation are available at:
39
[https://zenodo.org/records/11237172](https://zenodo.org/records/11237172)
40
41
## Data Preparation
42
### Dataset Requirements
43
- OAI (Osteoarthritis Initiative) dataset access required
44
- MOST (Multicenter Osteoarthritis Study) dataset access required
45
- Contact respective organizations for data access permissions
46
### Data Organization
47
- Separate HDF5 files for each MRI sequence type (DESS, IW-TSE, T1-TSE)
48
- CSV files for dataset splits and cohort information
49
- Proper file structure for OAI and MOST datasets
50
51
## Usage
52
53
### DESS Sequence
54
55
#### Training
56
```bash
57
python3 ./DESS/train.py \
58
    --file_path /path/to/save/models \
59
    --csv_path /path/to/split/csvs/DESS \
60
    --file_folder /path/to/DESS/HDF5/files \
61
    --val_fold [1-7]
62
```
63
64
#### Evaluation Options
65
66
1. Matched OAI Cohort:
67
```bash
68
python3 ./DESS/evaluate.py \
69
    --model_path /path/to/saved/models \
70
    --csv_path /path/to/split/csvs/DESS \
71
    --file_folder /path/to/DESS/HDF5/files
72
```
73
74
2. Internal OAI Test Set:
75
```bash
76
python3 ./DESS/Eval_OAI_DESS.py \
77
    --model_path /path/to/saved/models \
78
    --val_csv_path /path/to/split/csvs/DESS \
79
    --test_csv_path /path/to/csvs/OAI_SAG_DESS_test.csv \
80
    --file_folder /path/to/DESS/HDF5/files \
81
    --vote [True/False]
82
```
83
84
3. MOST Test Set:
85
```bash
86
python3 ./DESS/Eval_MOST_DESS.py \
87
    --model_path /path/to/saved/models \
88
    --val_csv_path /path/to/split/csvs/DESS \
89
    --test_csv_path /path/to/csvs/MOST_MRI_test.csv \
90
    --train_file_folder /path/to/DESS/HDF5/files \
91
    --file_folder /path/to/MOST/HDF5/files \
92
    --vote [True/False] \
93
    --contrast [HR_COR_STIR/SAG_PD_FAT_SAT]
94
```
95
96
### IW-TSE Sequence
97
98
#### Training
99
```bash
100
python3 ./IW-TSE/train.py \
101
    --file_path /path/to/save/models \
102
    --csv_path /path/to/split/csvs/IW-TSE \
103
    --file_folder /path/to/IW-TSE/HDF5/files \
104
    --val_fold [1-7]
105
```
106
107
#### Evaluation Options
108
109
1. Matched OAI Cohort:
110
```bash
111
python3 ./IW-TSE/evaluate.py \
112
    --model_path /path/to/saved/models \
113
    --csv_path /path/to/split/csvs/IW-TSE \
114
    --file_folder /path/to/IW-TSE/HDF5/files
115
```
116
117
2. Internal OAI Test Set:
118
```bash
119
python3 ./IW-TSE/Eval_OAI_IWTSE.py \
120
    --model_path /path/to/saved/models \
121
    --val_csv_path /path/to/split/csvs/IW-TSE \
122
    --test_csv_path /path/to/csvs/OAI_SAG_TSE_test.csv \
123
    --file_folder /path/to/IW-TSE/HDF5/files \
124
    --vote [True/False]
125
```
126
127
3. MOST Test Set:
128
```bash
129
python3 ./IW-TSE/Eval_MOST_IWTSE.py \
130
    --model_path /path/to/saved/models \
131
    --val_csv_path /path/to/split/csvs/IW-TSE \
132
    --test_csv_path /path/to/csvs/MOST_MRI_test.csv \
133
    --train_file_folder /path/to/IW-TSE/HDF5/files \
134
    --file_folder /path/to/MOST/HDF5/files \
135
    --vote [True/False] \
136
    --contrast [HR_COR_STIR/SAG_PD_FAT_SAT]
137
```
138
139
### T1-TSE Sequence
140
141
#### Training
142
```bash
143
python3 ./T1-TSE/train.py \
144
    --file_path /path/to/save/models \
145
    --csv_path /path/to/split/csvs/T1-TSE \
146
    --file_folder /path/to/T1-TSE/HDF5/files \
147
    --val_fold [1-7]
148
```
149
150
#### Evaluation Options
151
152
1. Matched OAI Cohort:
153
```bash
154
python3 ./T1-TSE/evaluate.py \
155
    --model_path /path/to/saved/models \
156
    --csv_path /path/to/split/csvs/T1-TSE \
157
    --file_folder /path/to/T1-TSE/HDF5/files
158
```
159
160
2. Internal OAI Test Set:
161
```bash
162
python3 ./T1-TSE/Eval_OAI_T1TSE.py \
163
    --model_path /path/to/saved/models \
164
    --val_csv_path /path/to/split/csvs/T1-TSE \
165
    --test_csv_path /path/to/csvs/OAI_COR_TSE_test.csv \
166
    --file_folder /path/to/T1-TSE/HDF5/files \
167
    --vote [True/False]
168
```
169
170
3. MOST Test Set:
171
```bash
172
python3 ./T1-TSE/Eval_MOST_T1TSE.py \
173
    --model_path /path/to/saved/models \
174
    --val_csv_path /path/to/split/csvs/T1-TSE \
175
    --test_csv_path /path/to/csvs/MOST_MRI_test.csv \
176
    --train_file_folder /path/to/T1-TSE/HDF5/files \
177
    --file_folder /path/to/MOST/HDF5/files \
178
    --vote [True/False] \
179
    --contrast [HR_COR_STIR/SAG_PD_FAT_SAT]
180
```
181
182
### Multi-Input Model
183
184
#### Training
185
```bash
186
python3 ./MI-DESS_IWTSE/train.py \
187
    --file_path /path/to/save/models \
188
    --csv_path /path/to/split/csvs/DESS \
189
    --file_folder1 /path/to/IW-TSE/HDF5/files \
190
    --file_folder2 /path/to/DESS/HDF5/files \
191
    --val_fold [1-7] \
192
    --IWdataset_csv /path/to/csvs/HDF5_00_cohort_2_prime.csv \
193
    --DESSdataset_csv /path/to/csvs/HDF5_00_SAG_3D_DESScohort_2_prime.csv
194
```
195
196
#### Evaluation Options
197
198
1. Matched OAI Cohort:
199
```bash
200
python3 ./MI-DESS_IWTSE/evaluate.py \
201
    --model_path /path/to/saved/models \
202
    --csv_path /path/to/split/csvs/DESS \
203
    --file_folder1 /path/to/IW-TSE/HDF5/files \
204
    --file_folder2 /path/to/DESS/HDF5/files \
205
    --IWdataset_csv /path/to/csvs/HDF5_00_cohort_2_prime.csv \
206
    --DESSdataset_csv /path/to/csvs/HDF5_00_SAG_3D_DESScohort_2_prime.csv
207
```
208
209
2. Internal OAI Test Set:
210
```bash
211
python3 ./MI-DESS_IWTSE/Eval_OAI_MI.py \
212
    --model_path /path/to/saved/models \
213
    --val_csv_path /path/to/split/csvs/DESS \
214
    --test_csv_path1 /path/to/csvs/OAI_SAG_TSE_test.csv \
215
    --test_csv_path2 /path/to/csvs/OAI_SAG_DESS_test.csv \
216
    --file_folder1 /path/to/IW-TSE/HDF5/files \
217
    --file_folder2 /path/to/DESS/HDF5/files \
218
    --vote [True/False] \
219
    --IWdataset_csv /path/to/csvs/HDF5_00_cohort_2_prime.csv \
220
    --DESSdataset_csv /path/to/csvs/HDF5_00_SAG_3D_DESScohort_2_prime.csv
221
```
222
223
## Results
224
225
### Model Performance
226
227
**Table 1: Receiver operator characteristic analysis with areas under the curve (AUC) and area under the precision-recall curve (AUPRC) evaluating the diagnostic performance of the models to predict total knee replacement (TKR) using sevenfold nested cross-validation on the training a validation group in the OAI database.**
228
229
| Model | AUC (95% CI) | p value | AUPRC (95% CI) | Sensitivity (%) (95% CI) | Specificity (%) (95% CI) |
230
|-------|--------------|----------|----------------|-------------------------|-------------------------|
231
| **MLP model** |
232
| Traditional | 0.77 (0.74, 0.81) | Reference | 0.76 (0.71, 0.81) | 73 (68, 77) | 73 (68, 78) |
233
| **CNN models** |
234
| DESS | 0.88 (0.86, 0.91) | <0.001 | 0.87 (0.83, 0.91) | 82 (78, 86) | 81 (77, 85) |
235
| FS-IW-TSE | 0.86 (0.84, 0.89) | <0.001 | 0.87 (0.84, 0.90) | 77 (73,82) | 84 (80, 87) |
236
| Multi-input MRI | 0.85 (0.82, 0.88) | <0.001 | 0.85 (0.81, 0.89) | 79 (75, 83) | 79 (74, 83) |
237
| IW-TSE | 0.87 (0.84, 0.90) | <0.001 | 0.87 (0.84, 0.90) | 82 (78, 86) | 78 (73, 82) |
238
| Radiograph | 0.87 (0.84, 0.89) | <0.001 | 0.87 (0.84, 0.90) | 81 (76, 85) | 80 (76, 84) |
239
| **Ensemble models** |
240
| MRI | 0.89 (0.87, 0.91) | <0.001 | 0.89 (0.87, 0.91) | 79 (75, 83) | 86 (82, 89) |
241
| MRI and radiograph | 0.90 (0.87, 0.92) | <0.001 | 0.90 (0.87, 0.93) | 80 (76, 84) | 85 (81, 88) |
242
243
Key findings from our results:
244
- All CNN and ensemble models significantly outperformed the traditional MLP model (p < 0.001)
245
- The MRI and radiograph ensemble model achieved the highest performance with AUC of 0.90 (95% CI: 0.87-0.92)
246
- DESS sequence alone showed strong performance with AUC of 0.88 (95% CI: 0.86-0.91)
247
248
249
250
## Citation
251
If you use this code in your research, please cite our paper:
252
[https://www.nature.com/articles/s41598-023-33934-1](https://www.nature.com/articles/s41598-023-33934-1)
253
254
```bibtex
255
@article{rajamohan2023prediction,
256
   title={Prediction of total knee replacement using deep learning analysis of knee MRI},
257
   author={Rajamohan, Haresh Rengaraj and Wang, Tianyu and Leung, Kevin and Chang, Gregory and Cho, Kyunghyun and Kijowski, Richard and Deniz, Cem M},
258
   journal={Scientific reports},
259
   volume={13},
260
   number={1},
261
   pages={6922},
262
   year={2023},
263
   publisher={Nature Publishing Group UK London}
264
}
265
```