Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.25 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.25 KB

Dataset analysis

In this folder, we perform an analysis of the dataset focusing on the lesion segmentations based on M0 manual segmentation and M12 predicted segmentations. In more detail, it looks at the correlation between age, phenotypes, lesion counts, lesion volume, lesion length, and lesion distribution. The steps are :

  1. Set up the environment
  2. Generate the dataframe
  3. Analyse the dataframe

Installation

To install the required libraries run :

pip install -r requirements_dataframe.txt

It is also required to install SpinalCordToolbox 6.0 :

Installation link : https://spinalcordtoolbox.com/user_section/installation.html

Dataframe generation

To generate the dataframe run :

python generate_dataframe.py --data /path/to/CanProCo --lesion /path/to/lesion/segmentation --discs /path/to/discs/segmentation --spinal-cord /path/to/spinal/cord/segmentation --timepoint M0 --exclude-file /path/to/exclude/file --output /path/to/output/folder

Note It uses the file image.py to fix the orientation of masks if they are not the same as the image's orientation

Dataframe analysis

The following Notebook dataframe_analysis.ipynb details the analysis of the generated dataframe. To use it, update the link to the CSV dataframes.