Home Tooling for image segmentation
Post
Cancel

Tooling for image segmentation

This is an attempt to do image segmentation using machine learning and FreeSurfer. The brain tumor segmentation (or BraTS) dataset was used. The model is based on a volume-to-volume Generative Adversarial Network (GAN). Part 2 will be about how to train a GAN model based on a paper by Cirillo et al.

Input tumor Input

Tumor Predicted

Before we can even do any of the above, we need to use proper tooling to get the images ready. This installation of FreeSurfer was done on Ubuntu 22.04. The easiest way to go about it is to use the *.deb package.

1
sudo dpkg -i freesurfer_ubuntu22-7.4.1_amd64.deb

If there are missing depdencies, the following is needed:

1
sudo apt update && sudo apt -y upgrade
1
sudo apt update && sudo apt -y upgrade
1
sudo apt --fix-broken install

Test with this:

1
2
3
4
5
6
freeview -v $SUBJECTS_DIR/bert/mri/brainmask.mgz \ 
-v $SUBJECTS_DIR/bert/mri/aseg.mgz:colormap=lut:opacity=0.2 \
-f $SUBJECTS_DIR/bert/surf/lh.white:edgecolor=yellow \
-f $SUBJECTS_DIR/bert/surf/rh.white:edgecolor=yellow \
-f $SUBJECTS_DIR/bert/surf/lh.pial:annot=aparc:edgecolor=red \
-f $SUBJECTS_DIR/bert/surf/rh.pial:annot=aparc:edgecolor=red

Freesurfer Freesurfer

This post is licensed under CC BY 4.0 by the author.