raidionics / Raidionics

Software for automatic segmentation and generation of standardized clinical reports of brain tumors from MRI volumes

Home Page:https://raidionics.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FLAIR segmentation not running for low-grade glioma mode

natalievpj opened this issue · comments

Is there a specific workaround for FLAIR-based segmentation of low grade glioma? Glioblastoma on T1-ce segmentation now works well, but given FLAIR (or T1ce, or T1w) and running the segmentation mode for low-grade glioma, the segmentation does not appear to want to initialise (red circle, seems to crash, no segmentation produced). Have tried importing just the FLAIR sequence (nifti) which is automatically correctly identified as FLAIR as the Data type; and loading multiple sequences (FLAIR, T1w, T1CE). I've tried via Actions> preoperative segmentation and via Run Segmentation; and have tried multiple different patient datasets. Thanks for advice.
Operating systems tried: Mac M1 Monterey and MacOS Catalina (Intel i7).

Hi @natalievpj,
There is no specific workaround for running the low-grade glioma segmentation model on FLAIR data. The process you describe seems correct, and it should work exactly like for glioblastoma use-cases.

Can you open the Logs window after an unsuccessful segmentation attempt, and copy paste the content of the window in here? You will find it in the top menu-bar, under Settings > Logs, of you can simply use the cmd(⌘) + L shortcut on Mac.

The pipeline file is downloaded at the same time as the segmentation model itself. However, if a new version of Raidionics is installed, the previous models folder on disk is not being deleted and old models are likely to then be incompatible because of a caching mechanism (which is an issue we have to fix).

In order to allow for a proper re-download of all models, especially after installing a new version of the software, you have to open the Settings panel (cmd(⌘) + P), and in System settings you have to click the Models purge option (with a trash bin icon).
You can then try to segment an LGG case, it might take a bit of time or freeze only showing the processing wheel with "-", which simply means that the model is being downloaded in the background.

Let me know if it fixed the problem.

Great!

Alternatively, you can also tick the Models update option in the Settings panel. It will force the system to check if a new model is available everytime the segmentation task is performed, and if so the latest model will be downloaded.

Hi @natalievpj,

I have just tried again the same process as you described above on an M1 machine. I've deleted the .raidionics folder and installed the latest v1.2.2. version for MacOS ARM, loaded a new FLAIR image, and ran the segmentation task, and everything worked fine.

As I can't seem to reproduce the issue, it is difficult to get an idea as to what might go wrong on your own machine. If no model is being downloaded automatically at all, it might be related to some internet, firewall, or Google Drive related issues. In that case, you can try to manually download the models as explained below.
I have not ran extensive testing when having many patients opened at the same time, but you more often experience issues in such use-case compared to opening a few patients?

Simple test

If you download the provided test data sample, available through the GUI buy clicking File > Download test data, and then load the T1 MRI scan available in the Raw subfolder (might have to adjust the sequence type to T1-CE in the right-hand side panel), can you run the preoperative segmentation task for Glioblastoma?

Models manual download

All the models used by Raidionics can indeed be manually downloaded at the following link, more specifically the LGG preop segmentation model is available here. After downloading the archive, you simply need to extract the content and place the obtained folder inside ~/.raidionics/resources/models/.

FLAIR images

I have noticed some issues when the intensity range for FLAIR images is within [0, 255], as the image might be confused with an annotation mask. Was it the case for the images you had trouble segmenting? You can have a look at the intensity range/histogram by clicking the Contrast button associated with the MRI scan to the right-hand side panel of the interface.

Settings/Preferences

After deleting the ~/.raidionics folder, all user preferences should have been set to their default values. But if you open the settings panel (through cmd(⌘) + P), and navigate Processing-Segmentation > Segmentation models, if the Output classes is not set to Tumor, the multiclass model will require multiple MRI scans as input (T1-w, T1-CE, T2, and FLAIR) for running successfully over the glioblastoma/low-grade glioma tumor types.

Those are ideas/suggestions that come to mind, let me know if you manage to solve your issue!

Great!
I will close this issue for now, but will further investigate as to why the automatic download of models can sometimes fail.

I have also opened two other issues for the problems you mentioned (#69 and #70), so it will be easier to follow-up and get notified when a new release fixing the problems is available.