Author: Sayeri Lala email: ls2121@alum.mit.edu, slala21021@gmail.com date: May 2019
Code for experiments reported in: -Lala, et al. A Deep Learning Approach for Image Quality Assessment of Fetal Brain MRI. ISMRM 2019. -thesis: Sayeri Lala, "Convolutional Neural Networks for 2D Slice Image Reconstruction and Image Quality Assessment of Fetal Brain MRI". Massachusetts Institute of Technology, 2019.
-any code used from another source was attributed in the source files
If you find the code/data/literature helpful please cite the following works:
-Lala, et al. A Deep Learning Approach for Image Quality Assessment of Fetal Brain MRI. ISMRM 2019. -thesis: Sayeri Lala, "Convolutional Neural Networks for 2D Slice Image Reconstruction and Image Quality Assessment of Fetal Brain MRI". Massachusetts Institute of Technology, 2019.
-
Matlab
-
Python (tested on version 2) -tensorflow-gpu -keras -numpy -matplotlib -scipy -nibabel -keras-vis
-MUST MAKE THE following change to vis/visualization/... file: overwrite the visualization/saliency.py:: visualize_cam_with_losses with the function definition provided in 'saliency_edits.py' -PIL -csv -pydicom -
RStudio -ROCR -binom -pROC -boot
Labeled data and train/val/test partitions prepared for the experiments available under: gpu.mit.edu: ~/../../unborn/shared/sayeri/iqa_data_source
Code: fork the 'cleaned' branch under the image_quality repository.
Creating the training/validation/test sets:
- run create_train_val_test.py
Training/evaluation (ROC, saliency maps)
-
Train and evaluate models: run call_run_pipeline.sh i.e., in the terminal ./call_run_pipeline.sh
Note that filepaths in run_pipeline.sh need to be updated.
-
Generate ROCs + statistical tests: run ci_metrics_final.R
More details available in these source files.
Testing:
- test_data for running tests in test/testDataset.py can be found under: gpu.mit.edu: ~/../../unborn/shared/sayeri/test_data
5-28-19. This code has been backed up on gpu.mit.edu: ~/../../unborn/shared/sayeri/image_quality
Labeled data and train/val/test partitions prepared for the experiments available under: gpu.mit.edu: ~/../../unborn/shared/sayeri/iqa_data_source
Preparing and labeling NEW data:
- download the data source folder
- run saveHASTEImages.m to reorganize and prepare the data for labeling
- for each dicom folder: -use the LabelBox interface to label data (below) -save the *.csv to the stack_# folder
Analyzing data:
- run analyze_data.py to analyze quality distribution
- characterizeDataset.m to analyze acquisition params
LabelBox instructions:
Labeling Interface (as of 4-24-19)
- Image Classification
- For the labeling interface, use the following template
- Labeling process for each stack. Go to Settings.
- Click Datasets. Under Existing Data, detach any previous stack data.
- Click Upload New Data. Upload the stack data
- Refresh. Click Start Labeling.
- After finishing the labeling, click Export. Note it could take time for all the labels to be uploaded so you might need to wait and hit refresh several times*
- Set Export format: CSV. Click Generate Export. Download labels file to the stack directory.
- Under Labels, click Delete & Reenque to delete the old stack labels.
Labeling interface template [ { "name": "image_quality", "instructions": "Select good/bad/uncertain", "type": "radio", "required": false, "options": [ { "value": "good", "label": "good" }, { "value": "bad", "label": "bad" }, { "value": "uncertain", "label": "uncertain" } ] }, { "name": "roi", "instructions": "roi present yes/no", "type": "radio", "required": false, "options": [ { "value": "yes", "label": "yes" }, { "value": "no", "label": "no" } ] } ]