# Can TotalSegmentator segment maxillofacial CT as well?

**URL:** https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484
**Category:** Support
**Tags:** segmentation, totalsegmentator
**Created:** [October 30, 2023, 12:17pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484 "2023-10-30T12:17:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Tijl](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Tijl](https://discourse.slicer.org/u/Tijl)
#### Post date: [October 30, 2023, 12:17pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/1 "2023-10-30T12:17:25Z")

</div>

Is it segmenting maxillofacial ct as well?

Met vriendelijke groeten,

T.H. van den Berg, Parodontoloog NVvP, Implantoloog NVOI

Zijlweg 144  
2015 BH Haarlem

+31 23 542 01 88

---

<div class="post-metadata">

### Author: ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)
#### Post date: [October 30, 2023, 2:13pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/2 "2023-10-30T14:13:32Z")

</div>

Please contact the developers on the [TotalSegmentator Github](https://github.com/wasserth/TotalSegmentator). You may add an issue with sample data there.

---

<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: [October 30, 2023, 3:43pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/3 "2023-10-30T15:43:16Z")

</div>

If you have segmented sample data then contacting TotalSegmentator developers would make sense. They may be able to train a network based on your data and make it openly available.

If you are looking for openly available automated segmentation tools for CMF images then you might find these Slicer extensions useful:

- [AutomatedDentalTools](https://github.com/DCBIA-OrthoLab/SlicerAutomatedDentalTools/tree/main#readme)
- [DentalModelSeg](https://github.com/DCBIA-OrthoLab/SlicerDentalModelSeg/blob/main/readme.md)
- [SlicerCMF](https://cmf.slicer.org/)

---

<div class="post-metadata">

### Author: ![diazandr3s](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/diazandr3s/32/9973_2.png) [@diazandr3s](https://discourse.slicer.org/u/diazandr3s)
#### Post date: [November 2, 2023, 12:06pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/4 "2023-11-02T12:06:20Z")

</div>

Hi @Tijl,

Great question. Have you considered using [MONAI Label](https://github.com/Project-MONAI/MONAILabel) for this?

Here is a project we’ve created with MONAI Label that may be of interest: [NA-MIC Project Weeks | Website for NA-MIC Project Weeks](https://projectweek.na-mic.org/PW37_2022_Virtual/Projects/MultistageTeethSegmentation/)

@dgmato can also comment on this

---

<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: [November 2, 2023, 12:42pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/5 "2023-11-02T12:42:51Z")

</div>

@diazandr3s need to figure out a way to run MONAILabel (at least inference) by a single click in Slicer. Many users would never even consider running commands in a terminal or install docker. For all these people MONAILabel is inaccessible now. The same way as nnunet can be installed in Slicer’s Python environment, we could install MONAI and its dependencies in the Slicer module; then select a model and download it and start a server - all using the GUI, by a few clicks. What do you think? Do you know about any plans in this direction?

---

<div class="post-metadata">

### Author: ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)
#### Post date: [November 2, 2023, 1:01pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/6 "2023-11-02T13:01:09Z")

</div>

It is not quite what you are aiming for @lassoan but we have successfully used MONAI bundle to integrate models from MONAI model ZOO during the last PW in Montreal.

> **[Project Description](https://projectweek.na-mic.org/PW39_2023_Montreal/Projects/MONAIBundleIntegrationTutorial/)**
>
> Website for NA-MIC Project Weeks

---

<div class="post-metadata">

### Author: ![diazandr3s](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/diazandr3s/32/9973_2.png) [@diazandr3s](https://discourse.slicer.org/u/diazandr3s)
#### Post date: [November 2, 2023, 2:13pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/7 "2023-11-02T14:13:35Z")

</div>

This is a good idea, @lassoan.

Having MONAI Label and the [Bundle models](https://github.com/Project-MONAI/model-zoo/tree/dev/models) available for inference only should be possible.

We could use a modified version of the Slicer’s MONAI Label module to run the inference commands in the background.

As @rbumm suggested, Bundles and the MONAI Label models can be easily run with a single command.

For the full experience (inference, training and active learning), users can be directed to the instructions for starting the MONAI Label server.

What do you think, @lassoan? We could start with the models for single modality

---

<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: [November 2, 2023, 2:22pm UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/8 "2023-11-02T14:22:19Z")

</div>

It all sounds good.

Could you provide a complete list of steps that users need to do manually now for a specific model? I would check what would it take to perform those steps automatically, in Slicer’s Python environment.

---

<div class="post-metadata">

### Author: ![diazandr3s](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/diazandr3s/32/9973_2.png) [@diazandr3s](https://discourse.slicer.org/u/diazandr3s)
#### Post date: [November 3, 2023, 12:51am UTC](https://discourse.slicer.org/t/can-totalsegmentator-segment-maxillofacial-ct-as-well/32484/9 "2023-11-03T00:51:34Z")

</div>

Sure! 🙂

The steps are the following:

> 1. Create a Python env and install MONAI Label  
> _pip install monailabel_
> 2. Download the apps: radiology and/or monaibundle  
> _monailabel apps --download --name monaibundle --output ./_
> 3. Within the app folder, execute the main Python file specifying the model and folder where the image(s) are located  
> Example command for the radiology app:  
> _python main.py -s /tmp/MONAILabelTest/sampleTest/ --model segmentation --test infer_
> 4. show the predictions saved in **test\_labels** folder

Here I created two videos showing how this can be done. I assumed the env with MONAI Label is already created.

_For the radiology app:_

_For the monaibundle app:_

In addition to the typical MONAI Label models (deepedit, segmentation, vertebra), users can also run the following models from the Model Zoo:

```auto
spleen_ct_segmentation 
pancreas_ct_dints_segmentation 
spleen_deepedit_annotation 
swin_unetr_btcv_segmentation 
renalStructures_UNEST_segmentation 
wholeBrainSeg_Large_UNEST_segmentation 
prostate_mri_anatomy 
lung_nodule_ct_detection 
wholeBody_ct_segmentation

```

Please let me know your thoughts. Happy to explain more about any of the steps presented here in the videos.
