# Image segmentation

**URL:** https://discourse.slicer.org/t/image-segmentation/33121
**Category:** Support
**Tags:** segmentation, dicom
**Created:** [November 29, 2023, 5:49pm UTC](https://discourse.slicer.org/t/image-segmentation/33121 "2023-11-29T17:49:17Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![S\_Esmaeili](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/s_esmaeili/32/66722_2.png) [@S\_Esmaeili](https://discourse.slicer.org/u/S_Esmaeili)
#### Post date: [November 29, 2023, 5:49pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/1 "2023-11-29T17:49:18Z")

</div>

i have many 2d dicoms and want to segment them with bounding box, could someone please help me about the easiest way to segment them? (actually, i want to determine the segmentation parts(names, colors,…) for once and then use it for segmenting other images)  
also i have another problem, when i load a new image, bounding boxes that i have drawn for the previous image is shown in the new image. how can i address this problem?

---

<div class="post-metadata">

### Author: ![yuanw](https://avatars.discourse-cdn.com/v4/letter/y/ec9cab/32.png) [@yuanw](https://discourse.slicer.org/u/yuanw)
#### Post date: [November 30, 2023, 7:42am UTC](https://discourse.slicer.org/t/image-segmentation/33121/2 "2023-11-30T07:42:49Z")

</div>

you can use the Total Segmentator extension.

---

<div class="post-metadata">

### Author: ![S\_Esmaeili](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/s_esmaeili/32/66722_2.png) [@S\_Esmaeili](https://discourse.slicer.org/u/S_Esmaeili)
#### Post date: [December 1, 2023, 3:28pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/3 "2023-12-01T15:28:53Z")

</div>

thank you. when running total segmentator i get this message: No module named ‘torch’

---

<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: [December 1, 2023, 6:27pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/4 "2023-12-01T18:27:47Z")

</div>

Please install torch with the Pytorch extension first. Keep in mind that you need a computer with a strong GPU to run AI programs like TotalSegmentator.

---

<div class="post-metadata">

### Author: ![S\_Esmaeili](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/s_esmaeili/32/66722_2.png) [@S\_Esmaeili](https://discourse.slicer.org/u/S_Esmaeili)
#### Post date: [December 1, 2023, 7:53pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/5 "2023-12-01T19:53:07Z")

</div>

Thanks, i installed pytorch extension but i get this message" Failed to compute results. No module named ‘torch’ " again.

---

<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: [December 1, 2023, 7:56pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/6 "2023-12-01T19:56:15Z")

</div>

Did you actually run the pytorch extension? (i.e., switch to Pytorch utils and choose automatic install)?

---

<div class="post-metadata">

### Author: ![S\_Esmaeili](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/s_esmaeili/32/66722_2.png) [@S\_Esmaeili](https://discourse.slicer.org/u/S_Esmaeili)
#### Post date: [December 7, 2023, 8:29pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/7 "2023-12-07T20:29:26Z")

</div>

i used extension manager and install total segmentator. pytorch extension installed automatically beside total segmentator.  
i install them on my laptop, which does not have very high GPU( NVDIA GeForce MX) could it be because of this?

---

<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: [December 7, 2023, 9:07pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/8 "2023-12-07T21:07:25Z")

</div>

Your error is torch library is missing.

Extension manager just installs the extension. I don’t know how totalsegmentator is doing, it but it is still worthwhile to switch (CTRL+F) pyTorch utils and check that torch is installed. If its not, hit automatic install and the module will load the torch most appropriate for your computer (if you don’t have Nvidia GPU, it will install the CPU version of torch).

---

<div class="post-metadata">

### Author: ![S\_Esmaeili](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/s_esmaeili/32/66722_2.png) [@S\_Esmaeili](https://discourse.slicer.org/u/S_Esmaeili)
#### Post date: [December 8, 2023, 8:01pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/9 "2023-12-08T20:01:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/6/e643697c15bb30bd017f47a0c7cf7e7bbf1a7be7.jpeg)  
yes it’s not installed.

---

<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: [December 9, 2023, 1:08am UTC](https://discourse.slicer.org/t/image-segmentation/33121/10 "2023-12-09T01:08:46Z")

</div>

What happens when you click Install PyTorch button?

---

<div class="post-metadata">

### Author: ![S\_Esmaeili](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/s_esmaeili/32/66722_2.png) [@S\_Esmaeili](https://discourse.slicer.org/u/S_Esmaeili)
#### Post date: [December 9, 2023, 7:14am UTC](https://discourse.slicer.org/t/image-segmentation/33121/11 "2023-12-09T07:14:42Z")

</div>

This message appears. I tried Uninstaller and then installed it again. But there is no difference.

در تاریخ شنبه ۹ دسامبر ۲۰۲۳،‏ ۰۴:۳۸ Murat Maga via 3D Slicer Community \<[notifications@slicer.discoursemail.com](mailto:notifications@slicer.discoursemail.com)\> نوشت:

---

<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: [December 9, 2023, 11:07pm UTC](https://discourse.slicer.org/t/image-segmentation/33121/12 "2023-12-09T23:07:22Z")

</div>

Does the path you have installed Slicer and the extensions contain any non-English characters? Those occassionally cause some problems. Perhaps try installing something like C:\Slicer and then try installing the pytorch extension, and running the automatic installation.
