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

patch-based inference approach for 3D volumes #7

Closed
himashi92 opened this issue Nov 7, 2023 · 3 comments
Closed

patch-based inference approach for 3D volumes #7

himashi92 opened this issue Nov 7, 2023 · 3 comments

Comments

@himashi92
Copy link

Hi,

Thanks for sharing your work with the community. Excellent work!

I have successfully trained SAM-Med3D for the brain tumor dataset, and now I want to evaluate the test set. In the paper, it is mentioned that SAM-Med3D operates using a patch-based inference approach. However, in the repository, I needed help finding the script or suitable function you used for 3D patch-based inference. I would appreciate it if you could share the script for this or let me know if I missed something here. :)

Kind regards,
Himashi

@hagersalehahmed
Copy link

how can solve this problem File
line 343, in train_epoch
epoch_loss /= step
ZeroDivisionError: float division by zero

@blueyo0
Copy link
Collaborator

blueyo0 commented Nov 16, 2023

Hi,

Thanks for sharing your work with the community. Excellent work!

I have successfully trained SAM-Med3D for the brain tumor dataset, and now I want to evaluate the test set. In the paper, it is mentioned that SAM-Med3D operates using a patch-based inference approach. However, in the repository, I needed help finding the script or suitable function you used for 3D patch-based inference. I would appreciate it if you could share the script for this or let me know if I missed something here. :)

Kind regards, Himashi

Hi, Himashi, thank you for your recognition~

Our patch-based inference script is the validation.py, and you can refer to evaluation in Readme for usage. BTW, this script only supports inference on a single patch (crop from the center of the target) instead of sliding-window inference of the whole image. If you need to conduct sliding-window inference, you may need to modify the script yourself or wait for my further update.

@blueyo0
Copy link
Collaborator

blueyo0 commented Nov 16, 2023

how can solve this problem File line 343, in train_epoch epoch_loss /= step ZeroDivisionError: float division by zero

Hi, hagersalehahmed
It seems like this issue is raised because your dataset is empty, so no step is run (step=0).
Please check your data first, example data structure in training may be helpful.

@blueyo0 blueyo0 closed this as completed Nov 21, 2023
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

3 participants