Open tzebre opened 1 year ago
New version of the notebook to produce graph : plot_distance.ipynb
Plot without faking a distribution from Cadotte (dot = mean, line = std):
I have also kept a version with all subjects on the graph because it can help identify outliers :
@tzebre instead of comparing the mean across subjects, why don't you compare subject-wise? Eg: you plot the location from PMJ (and/or length) as a difference between predicted and cadotte, for each subject.
@tzebre instead of comparing the mean across subjects, why don't you compare subject-wise? Eg: you plot the location from PMJ (and/or length) as a difference between predicted and cadotte, for each subject.
Yes, that was the initial plan. However, I started creating these graphs before obtaining the Cadotte images. Later, I tried using the Cadotte images, but the model's predictions for these images turned out to be inaccurate #11.
My current plan involves manually correcting some of the Cadotte predictions and then comparing my results (nerve segmentation to spinal level conversion script) with the values presented in the article. The objective is to validate the methodology used for the conversion.
To evaluate the model I had the idea to predict spinal level from the nerve segmentation and compare it to the value of Cadotte et al, 2015. The final goal is to reproduce with the same subject this graph:
For the moment I only compute the length between the most rostral and caudal rootlets.
To do this first I dilate the SC segmentation by 2 with
sct_maths -i XXX -o XXX -dilate 2
. After I get the intersection voxel between the rootlet segmentation and the dilated SC. Finally, I create an SC mask with an estimated spinal level and compute its length.I have made different scripts to do this :
utilities/intersect.py
utilities/rootlet_to_level.py
, create a spinal level map from a spinal nerve segmentation.utilities/segment_to_csv.py
, to create a csv file with different infos of spinal level.utilities/calc_all.py
, to call the previous script on a large number of files.Thanks to this script I have created different visualization.
Cadotte et al values :
Comparison of spinal level from model prediction vs manual labeling vs distribution with the Cadotte et al, 2015 mean and std
Predicted spinal level length:
Comparison of spinal level prediction on spine-generic vs distribution with the Cadotte et al, 2015 mean and std
Predicted spinal level length:
Discussion
Some SC segmentation failed during the process, and the resulting spinal level prediction failed. One solution can be to use manually corrected SC segmentation. Spinal level lengths are under-estimated, one of the solutions can be to dilate 3 instead of 2. But this solution is possibly going to shift the prediction along the SC.
TODO