-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with training on segmenter.py #1
Comments
Could you please paste the command you are using and the directory tree of your dataset (e.g. |
Here are the scans that I was using: https://github.com/js-kki/KKI-MUNet/tree/main/scans Here is the output of an attempt of running segmenter.py on one of the trained models: https://github.com/js-kki/KKI-MUNet/tree/main/segmentation_attempt1 Here are a few train commands I have tried to submit: python3 segmenter.py --savefolder ./trained_models/ --train --mask multislice_image_Mask.nii.gz, multislice_imageRE0972 --folds 2 ./ multislice_imageWM9986.nii EBmodVal_0 python3 segmenter.py --savefolder ./trained_models/ --train --mask multislice_image_Mask.nii.gz --folds 2 ./ multislice_imageWM9986.nii, multislice_imageRE0972 test_1 |
So, files should be organized in different folders, so inside your root folder you would have something like:
Then you would train it with something like: python3 segmenter.py /path/to/dataset_root scan.nii my_model --train --savefolder /path/to/my_trained_models --mask brain_mask.nii.gz --labels label1.nii.gz label2.nii.gz If you are still experiencing issues please copy and paste any error messages you might be receiving and the actual folder structure in which your data is organized. |
All I have is the scans, no mask or labels. The attempt of running segmenter without these is in the folder titled "segmentation_attempt1", and the output mask is unusable. Is it possible to run this without the mask/labels, or is it possible to extrapolate the mask and labels from your trained runs? |
Well, this is a supervised learning algorithm and you would need to retrain if for your dataset, so I'm afraid that without some labeled data this won't work. I do not have a set of weights for a model general enough to work on any given MRI dataset. Something you could consider doing is to prepare manual labels for a small number of samples, e.g. 5, use that to label a larger dataset, refine manually, and repeat on more data. Whether this is worth it depends on your use case. |
Thank you for the advice, I'll be sure to get back to you if I have further questions. |
Hello, I have run into trouble when attempting to use segmenter.py. I have axial volumes, (25x128x128), and attempted to use the pre-trained models in MU-Net-R to run segmenter.py on these scans. The outputs, when loaded in, contained zeroes except for ones at the bound indices. When attempting to add the --train flag, I wasn't sure how to incorporate all of my .nii files to train the model on, or if there were any validation samples around, and am unsure whether I need to modify anything regarding the folds/foldfiles. I feel as though I'm doing something wrong on the command line, but I'm unsure how to proceed. Any tips would be fantastic! I created a private repo with two axial .nii datasets if necessary.
The text was updated successfully, but these errors were encountered: