-
Notifications
You must be signed in to change notification settings - Fork 0
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
MS lesion Ground Truth segmentation on MP2RAGE images #292
Comments
Here in the QC for GT MS lesions for 104 subjects from Legend of QC masks
|
Thank you for your comments @jcohenadad TODO:
|
Here in the QC for GT MS lesions for all Legend of QC masks
I have also indicated with the |
Excellent work @Nilser3! My review 👉 qc_flags.json Legend:
In general, I find that you oversegment compared to the automatic segmentation. Specific suggested changes:
|
Thanks for your feedback @jcohenadad I have push to the git-annex 163 MS maks (159 masks corrected by
Redy for PR @mguaypaq
|
@Nilser3 I'm confused about the status of this issue. Is it ready for review, or are there still TODO items? |
@mguaypaq The TODO list will be for a next PR Thanks you, |
Ok, sorry for the delay. All the files are properly git-annexed. Merged into master. |
QC of subjects with lesions to be reviewed with a neuroradiologist |
Hi @Nilser3 I see 22 subjects to be revised. I am not sure we will have time to go through all cases since we have 9 subjects for tSCI and dcm (other projects) (except if you have very specific questions). Is it possible to prioritize some? |
DataI would like to generate the MS ground truth from the recently git-annexed data:
Automatic segmentations
Here the QC for Legend of QC masks
@plbenveniste it would be good to see the Related issue: |
Great work @Nilser3 ! |
I ran the following code which uses SCT branch Code used"""
This script is used to predict the MS lesion segmentation of the ms-rennes-mp2rage dataset using the model sct_deepseg -task ms_lesion_seg.
"""
import os
import sys
from pathlib import Path
from tqdm import tqdm
def main():
# Define the path to the dataset
path_data = '/home/GRAMES.POLYMTL.CA/p119007/label_ms_rennes/ms-rennes-mp2rage'
path_output = '/home/GRAMES.POLYMTL.CA/p119007/label_ms_rennes/predictions'
path_qc = '/home/GRAMES.POLYMTL.CA/p119007/label_ms_rennes/qc'
path_output_sc = '/home/GRAMES.POLYMTL.CA/p119007/label_ms_rennes/predictions_sc'
# get all files to segment using rglob
files_to_segment = list(Path(path_data).rglob('*UNIT1.nii.gz'))
# loop across all files
for file in tqdm(files_to_segment):
# build the output path for the lesion segmentation
path_output_file_sc = os.path.join(path_output_sc, file.name)
path_output_file_sc = path_output_file_sc.replace('.nii.gz', '_sc_seg.nii.gz')
# build the output path for the lesion segmentation
path_output_file_lesion = os.path.join(path_output, file.name)
path_output_file_lesion = path_output_file_lesion.replace('.nii.gz', '_seg.nii.gz')
if os.path.exists(path_output_file_lesion) and os.path.exists(path_output_file_sc):
print(f'File {file.name} already processed')
continue
# segment the spinal cord
if os.system(f'sct_deepseg -i {str(file)} -task seg_sc_contrast_agnostic -o {path_output_file_sc}') != 0:
print(f'Error processing {str(file)}')
return None
# # segment the file using sct_deepseg
if os.system(f'sct_deepseg -i {str(file)} -task seg_ms_lesion -o {path_output_file_lesion}') != 0:
print(f'Error processing {str(file)}')
return None
# Generate the QC report
if os.system(f'sct_qc -i {str(file)} -p sct_deepseg_lesion -d {path_output_file_lesion} -s {path_output_file_sc} -qc {path_qc} -plane sagittal') != 0:
print(f'Error processing {str(file)}')
return None
print('All files processed successfully')
if __name__ == '__main__':
main() Here is the QC of the output: qc.zip Also, I saw that some lesions were segmented in the brain in some cases which can easily be corrected using the spinal cord segmentation |
@Nilser3 I moved my predictions to this duke folder: |
Thank you @plbenveniste Legend of QC masks
|
Description
Data
nih-ms-mp2rage
As discussed here, the manual segmentations from
algo-2
(3D nnUnet, for details see. #75) will be used to start creating MS GTHere in the QC for
nih-ms-mp2rage
Legend of QC masks
Related Issues
#267 #56 #80 #75
The text was updated successfully, but these errors were encountered: