TotalSegmentator icon indicating copy to clipboard operation
TotalSegmentator copied to clipboard

Is the Liver Vessel Segmentation function only available in v1? Or did I overlook this feature in v2

Open QianMuXiao opened this issue 2 years ago • 5 comments

QianMuXiao avatar Oct 14 '23 11:10 QianMuXiao

In any case thank you very much for your work, which will be important in my subsequent work on the data preprocessing process!

QianMuXiao avatar Oct 14 '23 11:10 QianMuXiao

Correct, the liver vessel segmentation is not yet available in v2.

wasserth avatar Oct 16 '23 08:10 wasserth

I found that you have in fact retained the function of liver vessel segmentation in the source code of V2, and I have called out the function of liver vessel segmentation by downloading the weights and modifying the source code of V2, but I got the following error:

If you use this tool please cite: https://pubs.rsna.org/doi/10.1148/ryai.230024

C:\Users\xiaoqianmu.totalsegmentator\nnunet\results C:\Users\xiaoqianmu.totalsegmentator\nnunet\results Generating rough body segmentation... Resampling... Resampled in 1.03s Predicting... 100%|████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:03<00:00, 1.19it/s] Predicted in 15.11s Resampling... cropping from (512, 512, 164) to (264, 215, 162) Predicting... Traceback (most recent call last): File "C:\Anaconda\envs\FUXIAN\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Anaconda\envs\FUXIAN\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Anaconda\envs\FUXIAN\Scripts\TotalSegmentator.exe_main.py", line 7, in File "C:\Anaconda\envs\FUXIAN\lib\site-packages\totalsegmentator\bin\TotalSegmentator.py", line 127, in main totalsegmentator(args.input, args.output, args.ml, args.nr_thr_resamp, args.nr_thr_saving, File "C:\Anaconda\envs\FUXIAN\lib\site-packages\totalsegmentator\python_api.py", line 293, in totalsegmentator seg_img, ct_img = nnUNet_predict_image(input, output, task_id, model=model, folds=folds, File "C:\Anaconda\envs\FUXIAN\lib\site-packages\totalsegmentator\nnunet.py", line 392, in nnUNet_predict_image nnUNetv2_predict(tmp_dir, tmp_dir, task_id, model, folds, trainer, tta, File "C:\Anaconda\envs\FUXIAN\lib\site-packages\totalsegmentator\nnunet.py", line 146, in nnUNetv2_predict model_folder = get_output_folder(task_id, trainer, plans, model) File "C:\Anaconda\envs\FUXIAN\lib\site-packages\nnunetv2\utilities\file_path_utilities.py", line 22, in get_output_folder tmp = join(nnUNet_results, maybe_convert_to_dataset_name(dataset_name_or_id), File "C:\Anaconda\envs\FUXIAN\lib\site-packages\nnunetv2\utilities\dataset_name_id_conversion.py", line 74, in maybe_convert_to_dataset_name return convert_id_to_dataset_name(dataset_name_or_id) File "C:\Anaconda\envs\FUXIAN\lib\site-packages\nnunetv2\utilities\dataset_name_id_conversion.py", line 48, in convert_id_to_dataset_name raise RuntimeError(f"Could not find a dataset with the ID {dataset_id}. Make sure the requested dataset ID " RuntimeError: Could not find a dataset with the ID 8. Make sure the requested dataset ID exists and that nnU-Net knows where raw and preprocessed data are located (see Documentation - Installation). Here are your currently defined folders: nnUNet_preprocessed=C:\Users\xiaoqianmu.totalsegmentator\nnunet\results nnUNet_results=C:\Users\xiaoqianmu.totalsegmentator\nnunet\results nnUNet_raw=C:\Users\xiaoqianmu.totalsegmentator\nnunet\results If something is not right, adapt your environment variables. Exception ignored in: <totalsegmentator.libs.DummyFile object at 0x0000022D4AF2F610> AttributeError: 'DummyFile' object has no attribute 'flush'

QianMuXiao avatar Oct 16 '23 09:10 QianMuXiao

Calling the remaining commented code does not work. It is deactivated for a good reason ;). I first have to train a nnunet v2 on the liver vessel data. This did not happen yet.

wasserth avatar Oct 16 '23 10:10 wasserth

I completely understand , at the same time I found that the V1 version of the blood vessel segmentation results in more obvious blood vessel breakage phenomenon, but this phenomenon is the current liver blood vessel segmentation of the common difficulties. image

if you still need more labeled liver blood vessel data, I strongly recommend the following two datasets, the former of which is publicly available, and the latter seems to need to pay for it 3DIrcadb: https://www.ircad.fr/research/data-sets/liver-segmentation-3d-ircadb-01/ LiVS: https://ieee-dataport.org/documents/liver-vessel-segmentation

Thanks again for your work!

QianMuXiao avatar Oct 16 '23 10:10 QianMuXiao