Skip to content
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

questions about evaluate_segmenters.py #32

Open
WwwwJX opened this issue Dec 13, 2021 · 7 comments
Open

questions about evaluate_segmenters.py #32

WwwwJX opened this issue Dec 13, 2021 · 7 comments

Comments

@WwwwJX
Copy link

WwwwJX commented Dec 13, 2021

Thank you very much for sharing the code.
I have many questions about evaluate_segmenters.py. Could you tell me more details about how to run the evaluate_segmenters.py? And I can't find the src/losses, so I import the voxelmorph package. However I find I cannot find the binary_dice. So how can I do?
And if I let the ds_key=mri-100unlabeled-test then will "IndexError: list index out of range"
If I let the ds_key=mri-100unlabeled then will "KeyError: 'n_test'"
Thanks for your help

@xamyzhao
Copy link
Owner

evaluate_segmenters.py is a script used only to compare the different segmentation models described in the paper; it is not necessary for training an augmented segmentation model.

Searching for "dice" in the voxelmorph repo, I see there is now this sample: https://github.com/voxelmorph/voxelmorph/blob/dev/scripts/tf/test.py

You should select a ds_key that refers to your desired dataset defined in main.py. mri-100unlabeled-test is the one that I used, but depending on how many test volumes you have, it may be looking for more volumes than what is available (that is what the IndexError sounds like but it is impossible for me to say what the issue is without knowing where the error is coming from).

@WwwwJX
Copy link
Author

WwwwJX commented Dec 29, 2021

Sorry, I still don't know how to run the evaluate_segmenters.py. If I want use the mri-100unlabeled-test, how could I edit the code? Here is the errors
image

@WwwwJX
Copy link
Author

WwwwJX commented Jan 4, 2022

@xamyzhao
Sorry to trouble you. I waste much time on the script but still dont know how to run it. Can you tell me more details about it?

@xamyzhao
Copy link
Owner

xamyzhao commented Jan 4, 2022

It seems like here, evaluate_segmenters is looking for test data to evaluate your trained segmentation networks on, and is not finding any training or testing data. How many .npz files do you have for training/testing?

@WwwwJX
Copy link
Author

WwwwJX commented Jan 5, 2022

@xamyzhao
I use the dataset you provided to train and test. I know I have to find new data to run the test script, but I want to run the script firstly. I input the --data mri-100unlabeled for train script, and I let the ds_key as mri-100unlabeled-test in the test script.

@xamyzhao
Copy link
Owner

xamyzhao commented Jan 6, 2022

The script is failing right now because it is not finding enough test volumes. If you look at

data = load_vol_and_seg(
, the data loader is looking for 100 test volumes in a folder where you presumably have none.

@WwwwJX
Copy link
Author

WwwwJX commented Jan 6, 2022

@xamyzhao
Thank you very much. I modify the code you mentioned, and then I met this question.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants