ct-volume-preprocessing icon indicating copy to clipboard operation
ct-volume-preprocessing copied to clipboard

Poor segmentation results with TotalSegmentator.

Open windygoo opened this issue 1 year ago • 0 comments

import os import SimpleITK as sitk import numpy as np

data = np.load("ct/trn00022.npz") ct_data = data["ct"]

ct = sitk.GetImageFromArray(ct_data) ct = sitk.Cast(ct, sitk.sitkInt16)

ct.SetSpacing((0.8, 0.8, 0.8))

orientation = [1, 0, 0, 0, 1, 0] row_cosine, col_cosine = orientation[:3], orientation[3:6] z_cosine = np.cross(row_cosine, col_cosine).tolist() ct.SetDirection(row_cosine + col_cosine + z_cosine)

sitk.WriteImage(ct, "radchest_debug.nii.gz")

I use the above code to convert the data format from npz to nii.gz. Then, I use TotalSegmentator to predict the masks of prepared nii.gz images. However, I find the segmentation results are poor. How can I solve it? Thanks!

A8F4740C-CD91-43b1-96B1-EEB7B728EF10

windygoo avatar Sep 19 '24 13:09 windygoo