The model predicted some sort of lesion in 34 of 267 subjects (~12%); see the list below.
list of subjects
The loop using [get_unique_values](https://github.com/valosekj/bash_basics/blob/master/nii_tools/get_unique_values.py) to get the subjects with non-zero lesion masks:
```bash
for file in sub*/anat/*lesion*.nii.gz;do unique_values=$(get_unique_values $file);if [[ $unique_values == "[0. 1.]" ]];then echo $file >> lesion.txt;fi;done
```
```bash
sub-amu02/anat/sub-amu02_T2w_lesion_seg.nii.gz
sub-balgrist05/anat/sub-balgrist05_T2w_lesion_seg.nii.gz
sub-balgrist06/anat/sub-balgrist06_T2w_lesion_seg.nii.gz
sub-beijingVerio02/anat/sub-beijingVerio02_T2w_lesion_seg.nii.gz
sub-brnoCeitec06/anat/sub-brnoCeitec06_T2w_lesion_seg.nii.gz
sub-brnoUhb02/anat/sub-brnoUhb02_T2w_lesion_seg.nii.gz
sub-brnoUhb03/anat/sub-brnoUhb03_T2w_lesion_seg.nii.gz
sub-cardiff02/anat/sub-cardiff02_T2w_lesion_seg.nii.gz
sub-cardiff05/anat/sub-cardiff05_T2w_lesion_seg.nii.gz
sub-cardiff06/anat/sub-cardiff06_T2w_lesion_seg.nii.gz
sub-cmrrb03/anat/sub-cmrrb03_T2w_lesion_seg.nii.gz
sub-fslPrisma05/anat/sub-fslPrisma05_T2w_lesion_seg.nii.gz
sub-hamburg01/anat/sub-hamburg01_T2w_lesion_seg.nii.gz
sub-juntendo750w05/anat/sub-juntendo750w05_T2w_lesion_seg.nii.gz
sub-nottwil01/anat/sub-nottwil01_T2w_lesion_seg.nii.gz
sub-nottwil04/anat/sub-nottwil04_T2w_lesion_seg.nii.gz
sub-nwu06/anat/sub-nwu06_T2w_lesion_seg.nii.gz
sub-oxfordFmrib01/anat/sub-oxfordFmrib01_T2w_lesion_seg.nii.gz
sub-oxfordFmrib04/anat/sub-oxfordFmrib04_T2w_lesion_seg.nii.gz
sub-oxfordFmrib06/anat/sub-oxfordFmrib06_T2w_lesion_seg.nii.gz
sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T2w_lesion_seg.nii.gz
sub-oxfordFmrib08/anat/sub-oxfordFmrib08_T2w_lesion_seg.nii.gz
sub-oxfordOhba02/anat/sub-oxfordOhba02_T2w_lesion_seg.nii.gz
sub-strasbourg03/anat/sub-strasbourg03_T2w_lesion_seg.nii.gz
sub-tokyo750w02/anat/sub-tokyo750w02_T2w_lesion_seg.nii.gz
sub-tokyoIngenia02/anat/sub-tokyoIngenia02_T2w_lesion_seg.nii.gz
sub-tokyoIngenia03/anat/sub-tokyoIngenia03_T2w_lesion_seg.nii.gz
sub-tokyoIngenia07/anat/sub-tokyoIngenia07_T2w_lesion_seg.nii.gz
sub-tokyoSkyra02/anat/sub-tokyoSkyra02_T2w_lesion_seg.nii.gz
sub-ubc01/anat/sub-ubc01_T2w_lesion_seg.nii.gz
sub-ubc04/anat/sub-ubc04_T2w_lesion_seg.nii.gz
sub-ucdavis07/anat/sub-ucdavis07_T2w_lesion_seg.nii.gz
sub-vuiisIngenia04/anat/sub-vuiisIngenia04_T2w_lesion_seg.nii.gz
sub-vuiisIngenia05/anat/sub-vuiisIngenia05_T2w_lesion_seg.nii.gz
```
Going through QC (available on this link), in most cases, the false positive lesion segmentation corresponds to the central canal (filled with cerebrospinal fluid). In a few other subjects, some hyperintense cord areas or areas with low signal were segmented.
QC GIF
![Kapture 2024-08-28 at 07 34 05](https://github.com/user-attachments/assets/12b8f7d3-b4db-4c7a-872a-d804eac139f4)
Next steps
Improve the model to lower the number of false positive segmentations.
Idea: include spine-generic subjects (with empty lesion GT) in the training set to teach the model not to segment the spinal canal.
Description
I tested SCIsegV2 (as part of SCT v6.4) on healthy subjects from spine-generic data-multi-subject to assess the number of false positive lesion segmentations.
Script
Script used: baselines/run_inference_spine-generic.sh
Results
The model predicted some sort of lesion in 34 of 267 subjects (~12%); see the list below.
list of subjects
The loop using [get_unique_values](https://github.com/valosekj/bash_basics/blob/master/nii_tools/get_unique_values.py) to get the subjects with non-zero lesion masks: ```bash for file in sub*/anat/*lesion*.nii.gz;do unique_values=$(get_unique_values $file);if [[ $unique_values == "[0. 1.]" ]];then echo $file >> lesion.txt;fi;done ``` ```bash sub-amu02/anat/sub-amu02_T2w_lesion_seg.nii.gz sub-balgrist05/anat/sub-balgrist05_T2w_lesion_seg.nii.gz sub-balgrist06/anat/sub-balgrist06_T2w_lesion_seg.nii.gz sub-beijingVerio02/anat/sub-beijingVerio02_T2w_lesion_seg.nii.gz sub-brnoCeitec06/anat/sub-brnoCeitec06_T2w_lesion_seg.nii.gz sub-brnoUhb02/anat/sub-brnoUhb02_T2w_lesion_seg.nii.gz sub-brnoUhb03/anat/sub-brnoUhb03_T2w_lesion_seg.nii.gz sub-cardiff02/anat/sub-cardiff02_T2w_lesion_seg.nii.gz sub-cardiff05/anat/sub-cardiff05_T2w_lesion_seg.nii.gz sub-cardiff06/anat/sub-cardiff06_T2w_lesion_seg.nii.gz sub-cmrrb03/anat/sub-cmrrb03_T2w_lesion_seg.nii.gz sub-fslPrisma05/anat/sub-fslPrisma05_T2w_lesion_seg.nii.gz sub-hamburg01/anat/sub-hamburg01_T2w_lesion_seg.nii.gz sub-juntendo750w05/anat/sub-juntendo750w05_T2w_lesion_seg.nii.gz sub-nottwil01/anat/sub-nottwil01_T2w_lesion_seg.nii.gz sub-nottwil04/anat/sub-nottwil04_T2w_lesion_seg.nii.gz sub-nwu06/anat/sub-nwu06_T2w_lesion_seg.nii.gz sub-oxfordFmrib01/anat/sub-oxfordFmrib01_T2w_lesion_seg.nii.gz sub-oxfordFmrib04/anat/sub-oxfordFmrib04_T2w_lesion_seg.nii.gz sub-oxfordFmrib06/anat/sub-oxfordFmrib06_T2w_lesion_seg.nii.gz sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T2w_lesion_seg.nii.gz sub-oxfordFmrib08/anat/sub-oxfordFmrib08_T2w_lesion_seg.nii.gz sub-oxfordOhba02/anat/sub-oxfordOhba02_T2w_lesion_seg.nii.gz sub-strasbourg03/anat/sub-strasbourg03_T2w_lesion_seg.nii.gz sub-tokyo750w02/anat/sub-tokyo750w02_T2w_lesion_seg.nii.gz sub-tokyoIngenia02/anat/sub-tokyoIngenia02_T2w_lesion_seg.nii.gz sub-tokyoIngenia03/anat/sub-tokyoIngenia03_T2w_lesion_seg.nii.gz sub-tokyoIngenia07/anat/sub-tokyoIngenia07_T2w_lesion_seg.nii.gz sub-tokyoSkyra02/anat/sub-tokyoSkyra02_T2w_lesion_seg.nii.gz sub-ubc01/anat/sub-ubc01_T2w_lesion_seg.nii.gz sub-ubc04/anat/sub-ubc04_T2w_lesion_seg.nii.gz sub-ucdavis07/anat/sub-ucdavis07_T2w_lesion_seg.nii.gz sub-vuiisIngenia04/anat/sub-vuiisIngenia04_T2w_lesion_seg.nii.gz sub-vuiisIngenia05/anat/sub-vuiisIngenia05_T2w_lesion_seg.nii.gz ```Going through QC (available on this link), in most cases, the false positive lesion segmentation corresponds to the central canal (filled with cerebrospinal fluid). In a few other subjects, some hyperintense cord areas or areas with low signal were segmented.
QC GIF
![Kapture 2024-08-28 at 07 34 05](https://github.com/user-attachments/assets/12b8f7d3-b4db-4c7a-872a-d804eac139f4)Next steps
Improve the model to lower the number of false positive segmentations. Idea: include spine-generic subjects (with empty lesion GT) in the training set to teach the model not to segment the spinal canal.