KitwareMedical / SlicerNNUnet

3D Slicer nnUNet integration to streamline usage for nnUNet based AI extensions.
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link

Ensembling? #8

Open bartbols opened 2 months ago

bartbols commented 2 months ago

Hi

First of all - thanks for making this extremely useful extension available.

I have installed the app without issues and ran it on my own trained nnUNet. It works very well. I just have a question about if/how it does the ensembling? I usually train 2d and 3d_fullres models and use nnUNet's "find best configuration" option before inference. But I don't think the nnUNet Slicer extension uses the 3d_fullres model for inferencing, even though it is available in my folder structure. To test this out, I changed the name of one of the 3d_fullres fold's foldernames from fold_0 to fold_xxx, expecting it to return an error but it didn't so I suspect it only uses my trained 2d models. Just wondering if someone could clarify how it does the inferencing when multiple models are available.

Bart

Thibault-Pelletier commented 2 months ago

Hi @bartbols,

Thanks for using this extension and for reaching out to us!

The current extension doesn't use every args available in the library. find_best_configuration and using the fold=all option are included.

When provided a model path, it will look for the first dataset.json file it finds in the folder and use this as the model root directory for inference (in your case the 2D model). To use your 3D model, you should use the 3D model folder explicitly.

I will add the support for ensembling to the feature request for future versions of the extension, although I won't be able to give you a timeline on its developments.

Best, Thibault