# TotalSegmentator for MRI dataset

**URL:** <https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080>\
**Category:** Support\
**Created:** [March 26, 2024, 1:26am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080 "2024-03-26T01:26:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 26, 2024, 1:26am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/1 "2024-03-26T01:26:34Z")

</div>

Is there an full body (or lower limb) muscle segmentation model from MRI images? As I understand totalsegmentator is specifically for CT.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 26, 2024, 2:38am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/2 "2024-03-26T02:38:29Z")

</div>

There are a couple of pre-trained MRI segmentation models for MONAI Auto3DSeg (brain, prostate, etc) and you can probably find some spine segmentation models, but I don’t remember seeing any for lower lung muscles. However, it is almost sure your can train Auto3DSeg or nnUNet model for this quite easily, by manually segment cases (perhaps a few dozen is enough to get started)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 26, 2024, 4:09pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/3 "2024-03-26T16:09:08Z")

</div>

We have a project underway to try training an MR segmenter based on TotalSegmentator using the SynthSeg approach (not muscles yet though). The preprint paper actually just went up on arxiv:

> **[Towards Automatic Abdominal MRI Organ Segmentation: Leveraging Synthesized...](https://arxiv.org/abs/2403.15609)**
>
> Deep learning has shown great promise in the ability to automatically annotate organs in magnetic resonance imaging (MRI) scans, for example, of the brain. However, despite advancements in the field, the ability to accurately segment abdominal organs...

Would be great to generalize to other segmentation tasks.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 29, 2024, 12:53am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/4 "2024-03-29T00:53:07Z")

</div>

This looks interesting @pieper. Is the trained model available publicly?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 29, 2024, 12:18pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/5 "2024-03-29T12:18:11Z")

</div>

Not currently, but I’ll check.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [March 29, 2024, 12:29pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/6 "2024-03-29T12:29:17Z")

</div>

> [@lassoan](#):
>
> This looks interesting @pieper. Is the trained model available publicly?

Andras, @DeepaKrishnaswamy and @Cosmin_Ciausu are working on this. We absolutely will make everything publicly available, but there are some experiments and refinements that we want to do first. It’s great to see the interest. This most definitely adds a lot to the motivation to continue this work!

---

<div class="post-metadata">

**Author:** ![DeepaKrishnaswamy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepakrishnaswamy/32/8913_2.png) [@DeepaKrishnaswamy](https://discourse.slicer.org/u/DeepaKrishnaswamy)\
**Post date:** [April 16, 2024, 2:18pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/7 "2024-04-16T14:18:54Z")

</div>

Hi @lassoan,

Thank you for your interest! As @fedorov said, we are in the process of doing a few more experiments. We are definitely planning on making the model, and the code, publicly available, and will get back to you when we are at that stage.

Deepa and Cosmin

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 31, 2024, 3:08am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/8 "2024-05-31T03:08:10Z")

</div>

Following up here, TotalSegmentator v2.2 now has support for MR tasks. SlicerTotalSegmentator will have to be updated to specify to use this new version.

From [GitHub - wasserth/TotalSegmentator: Tool for robust segmentation of \>100 important anatomical structures in CT and MR images](https://github.com/wasserth/TotalSegmentator?tab=readme-ov-file#totalsegmentator) :

> ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/0/b0b13f1802895a7f1e8b40a68c79fddf41626442.png)

---

<div class="post-metadata">

**Author:** ![mangotee](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mangotee](https://discourse.slicer.org/u/mangotee)\
**Post date:** [May 31, 2024, 7:55am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/9 "2024-05-31T07:55:02Z")

</div>

There is also [MRSegmentator](https://github.com/hhaentze/MRSegmentator), also based on nnUnet., and trained on 1400+ MRI images from UKBB.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [May 31, 2024, 8:20am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/10 "2024-05-31T08:20:10Z")

</div>

> [@jamesobutler](#):
>
> Following up here, TotalSegmentator v2.2 now has support for MR tasks.

If anyone experimented with this model, I would be very interested to hear about your experience!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 31, 2024, 4:41pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/11 "2024-05-31T16:41:14Z")

</div>

We have been discussing this with @wasserth. I expect that MRI segmentation will be available in Slicer TotalSegmentator extension from tomorrow. I’ll post updates here.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 31, 2024, 5:46pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/12 "2024-05-31T17:46:44Z")

</div>

TotalSegmentator extension is updated now to use the latest models, including the new `total_mr`. The update is available from tomorrow for both the latest Slicer Stable Release (Slicer-5.6) and latest Slicer Preview Release (Slicer-5.7 downloaded 2024-06-01 or later).

Example result for an abdominal MRI (source image: Imaging Data Commons / CMC-CRC-MSB-01262 / MRI Abdomen / 31 AX T1 3D FS 3MIN POST\_W):

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/6/56a51a5624e21ea34a8bcc2a8df287a74f2f98a5.jpeg)

Slice sweep:

3D Rotation:

---

<div class="post-metadata">

**Author:** ![ffournier13](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ffournier13/32/69816_2.png) [@ffournier13](https://discourse.slicer.org/u/ffournier13)\
**Post date:** [June 3, 2024, 8:47am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/13 "2024-06-03T08:47:18Z")

</div>

Hi @lassoan  
This is looking very nice !  
I tried on my MRI data set but even without the fast setting checked, the segmentation is not as good as yours.  
Is there a preferred protocol or parameter for the segmentations to work better? I am working with T2 HASTE, with 4mm slices on the transverse plane, but this could change. Do you have any recommendations?

Here is an example of segmentation I did just now with the new total\_mr (we can see, for example, that the stomach is not well segmented):

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/0/9004cc030009d69024a6d72ad06ad9b660834848.jpeg)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/5/85347645f0c95f12a320562d7ead2309ca0a366f.jpeg)

Thank you in advance for your answer!

François

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 3, 2024, 12:32pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/14 "2024-06-03T12:32:49Z")

</div>

4mm slice thickness is very large. Each voxel is a long stick, it is very difficult to create accurate segmentation at such crude resolution.

You may try resampling the image to have isotropic spacing using Crop volume module to see if it improves the results. Let us know is it helped.

---

<div class="post-metadata">

**Author:** ![ffournier13](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ffournier13/32/69816_2.png) [@ffournier13](https://discourse.slicer.org/u/ffournier13)\
**Post date:** [June 5, 2024, 7:08am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/15 "2024-06-05T07:08:11Z")

</div>

Thank you for your answer @lassoan.  
I’ll try it and get back to you.  
What slice thickness did you use to get the result you showed in the above video ? Maybe you could share details aboute sequences that would work with this new version of total segmentator ?  
Reducing slice thickness will induce other anatomical errors. I think, as MRI sequences are already taking 1min30s, with longer MRI movements will change the gastrointestinal anatomy during the acquisition …

---

<div class="post-metadata">

**Author:** ![wasserth](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@wasserth](https://discourse.slicer.org/u/wasserth)\
**Post date:** [June 12, 2024, 7:30am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/16 "2024-06-12T07:30:19Z")

</div>

Thanks Andras for updating the TotalSegmentator Slicer Extension to the newest TotalSegmentator version!  
The problem with many MR images is the much bigger slice thickness compared to CT. This lower data quality results in lower accuracy compared to TotalSegmentator CT. In our training dataset we have many low resolution MR datasets. For these images it is also difficult to create good ground truth annotations. The alternative would be to train only on nice high quality MR images. Then the segmentation accuracy would be better on high res MR images, but the model would not work as robustly on any MR sequence. We decided to prioritise robustness. For many applications this level of accuracy is still fine. For some applications you need higher accuracy. Then some refinement of the initial segmentation is needed.

---

<div class="post-metadata">

**Author:** ![mwirtz](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mwirtz](https://discourse.slicer.org/u/mwirtz)\
**Post date:** [June 17, 2024, 8:22am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/17 "2024-06-17T08:22:49Z")

</div>

On the official download page, I still only find the latest stable release (revision 32448) built on 2024-04-05 without the new `total_mr` segmentation. Am I overseeing something or was there an issue updating the latest release?

Thanks in advance!

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/5/75e51bc7ec01019947b6d267b030166ff713fdf9.png)

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [June 17, 2024, 7:30pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/18 "2024-06-17T19:30:59Z")

</div>

@mwirtz this functionality is available in a Slicer extension. The version you see on the download page is the version of the Slicer application. Individual extensions may have more recent builds.

---

<div class="post-metadata">

**Author:** ![mwirtz](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mwirtz](https://discourse.slicer.org/u/mwirtz)\
**Post date:** [June 19, 2024, 7:09am UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/19 "2024-06-19T07:09:31Z")

</div>

Thanks @fedorov, yes I tried to install the extension in the latest Stable release and `total_mr` was not appearing. I assumed it might still have something to do with the built version being older than the extension update.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 19, 2024, 3:40pm UTC](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080/20 "2024-06-19T15:40:02Z")

</div>

@mwirtz

You are not doing anything wrong. I assume you are trying windows.

There is an ongoing issue about extensions on windows build. Total segmentator is one of those affected (no windows build per Cdash. [CDash](https://slicer.cdash.org/index.php?project=SlicerStable))

Devs are aware of the issue and looking into it, but I do not know when it is going to resolved.

Linux and and Mac seems unaffected from this. If you have access to those you can on those OS.

[Next page](https://discourse.slicer.org/t/totalsegmentator-for-mri-dataset/35080.md?page=2)
