Use case: intracerebral haemorrhage #640
Replies: 5 comments 5 replies
-
Step 1: installing Slicer preview in Linux.
|
Beta Was this translation helpful? Give feedback.
-
Step 2: installing MONAIlabel and initial setupJust follow the friendly instructions here! In my case:
I will be segmenting both haemorrhagic lesions and calcification from my images, so I chose
I then modify the labels by editing these lines of main.py to:
I have a set of CT brain images with expert labels. These are in BIDS format, so I have to reorganize them. Fortunately there is only one base image per subject, so I can get these easily:
Unfortunately, my labels are in separate, binary images, so I need to combine them. The easiest way to do this is with the FSL command line tool find_the_biggest. I also have MATLAB code that would do the trick: maxmap.m.txt (remove the .txt). If you are trying this, it's your choice whether it's more painful to install FSL or to write a MATLAB wrapper for your images. Example output for a single subject:
My script
Command to run:
(Note that FSL saves as .nii.gz, so in my case I'll need to either So now I have my app customized with my labels, and a full set of images and labels in the monailabel directory. To test it out I'll need to remove some of the manual images and see how it does with those. |
Beta Was this translation helpful? Give feedback.
-
Step 3: start the serverTried first with plain:
It didn't seem to use the values of
The second command prevented downloading the pretrained model as expected. Unfortunately, model training is stalling at about 5% complete. |
Beta Was this translation helpful? Give feedback.
-
Results - one labelUsing deepedit_multilabel, I trained the model on 46 images with the default 50 epochs in under one hour, leaving 6 for manual labelling. The first result is using only background and haemorrhage labels. The initial accuracy was 71%. The segmentation is pretty good, although it is blocky. The base images are thick sliced, with 0.5 x 0.5 x 5.0 mm voxels. The main edits I needed to make involved trimming the edge of the automatic label. I found using Deepedit landmarks slow going, so mostly used the paint tool, switching to the draw tool for fine structures. More to come ... |
Beta Was this translation helpful? Give feedback.
-
Results - two labelsTraining time was similar to one label, but overall accuracy was only 42%. This is because it failed to learn to spot the calcium labels, perhaps because these are small. Here is an example with model above and expert (not me) manual labels below. Final accuracy after submitting my edits of the six remaining images went down to 31%! |
Beta Was this translation helpful? Give feedback.
-
I am a complete noob to MONAI in general, but an experienced brain imager. I will be making notes here on getting MONAIlabel working for segmentation of haemorrhagic lesions.
Beta Was this translation helpful? Give feedback.
All reactions