hulinkuang / Cl-SegNet

Cl-SegNet
GNU General Public License v2.0
9 stars 1 forks source link

unable to fetch training data in data_conversion.py #3

Open Ayanzadeh93 opened 7 months ago

Ayanzadeh93 commented 7 months ago

When I run data_conversion.py, I get this error. I locate the training data in the correct path and modify it in the Python file. Can you please help me resolve this issue?

Traceback (most recent call last): File "/nfs/ada/jason/users/jack/stroke/Cl-SegNet/data/Task402_AIS.py", line 127, in train_ids, val_ids = train_test_split(train, test_size=0.118, shuffle=True, random_state=99) File "/home/jack/.conda/envs/pytorch/lib/python3.9/site-packages/sklearn/model_selection/_split.py", line 2422, in train_test_split n_train, n_test = _validate_shuffle_split( File "/home/jack/.conda/envs/pytorch/lib/python3.9/site-packages/sklearn/model_selection/_split.py", line 2098, in _validate_shuffle_split raise ValueError( ValueError: With n_samples=0, test_size=0.118 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

cirensangzhu-CASIA commented 7 months ago

Hi! Have you figured out the problem? I met the similar problem. I ran Task402_AIS.py in the nnUNet/nnunet/dataset_conversion folder, and I also changed the "train_dir" and "output_folder" in line 69 and 71 with my situation. Then, I got the same error. I think probably there is something wrong with line 91-92. By the way, I found that the AISD dataset downloaded from https://github.com/GriffinLiang/AISD is in .png or .dcm(dicom) format, not the required .nii.gz format as mentioned in nnUNet/documentation/dataset_conversion.md. I guess the author did some other operation to convert the dataset, but forgot to mention in the published code. @hulinkuang Could you please help us to resolve the issue?