BAAI-DCAI / SegVol

The official code for "SegVol: Universal and Interactive Volumetric Medical Image Segmentation".
MIT License
245 stars 22 forks source link

Demo Reproducing Question #20

Open kennyWJB opened 5 months ago

kennyWJB commented 5 months ago

Thanks for your amazing work in this project! I am a freshman in ML and just encountered some problems during reproducing the demo. Please help to solve them. My version config: Window, python3.8, cuda==12.2, pytorch==2.0.1, monai==1.3.1(fail to install 0.9.0), einops==0.6.1, transformers==4.18.0

  1. Failed to execute "pip install 'monai[all]==0.9.0'". The error was: ERROR: Could not find a version that satisfies the requirement cucim>=21.8.2; extra == "all" (from monai[all]) (from versions: none) ERROR: No matching distribution found for cucim>=21.8.2; extra == "all"

    企业微信截图_17175793606339
  2. Bug met when executeing inference_demo.py The bug occurred in line 69. It may occurred by wrong file path or unzipped file stated in Question 3.

    屏幕截图 2024-06-05 171045
  3. I would like to check the content of user parameters since I am not really understand the meaning of them. According to the demo Google Drive , config_demo.json and inference_demo.sh, ct_path is the path of Case_image_00001_0000.nii.gz, gt_path is the path of Case_label_00001.nii.gz, segvol_ckpt is the path of ViT_pretrain.ckpt and work_dir can be any directory to store logs. Is that correct? If so, what is the effect of SigVol_vi.pth in google drive and how to use it? Furthermore, do we need to unzip those nii.gz files? I noticed on ZhiHu that someone said using nii files but I failed and met that bug(Question 2) whether unzipping or not. Here is my config file.

    屏幕截图 2024-06-05 171021 屏幕截图 2024-06-05 171005 截屏2024-06-05 17 56 25
Yuxin-Du-Lab commented 5 months ago

Thank you for your interest in our work.

For your Q1: I did not encounter similar problems when executing "pip install 'monai[all]==0.9.0'", you can go to MONAI's official website to raise the issue.

For your Q2: This is an expected BUG if you install a newer MONAI version for MONAI 0.9.0 and 1.3.1 have different return values in their image load function. If you have difficulty installing MONAI 0.9.0, you need to write the correct code according to MONAI 1.3.1 API to get the CT volume data in numpy format and assign it to ct_voxel_ndarray.

For your Q3: I didn't see any description of Q3.

For your Q4: ct_path and gt_path is set correctly. segvol_ckpt should be set as the path of SegVol_v1.pth instead of the ViT_pretrain.ckpt. No need to unzip any nii.gz files.

PS: Running SegVol with MONAI 1.3.1 may encounter other unexpected errors.

Any further questions are welcome😊.