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

Better model selection #142

Closed
wolny opened this issue Apr 12, 2023 · 5 comments
Closed

Better model selection #142

wolny opened this issue Apr 12, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@wolny
Copy link
Collaborator

wolny commented Apr 12, 2023

When trying all available models, we should only try 2D or 3D models on a given data. We can select the models automatically based on the patch_size or input size. Currently if the patch size is 3D the 2d models just fail and the other way around.

@wolny wolny added the enhancement New feature or request label Apr 12, 2023
@lorenzocerrone
Copy link
Collaborator

I think it make sense to only try 2D models on 2D inputs, but sometimes it might be useful to run the 2D models on 3D inputs (like if you have very coarse resolution in z, or not enough z-slices, or if you have a 2D+t stack)

@wolny
Copy link
Collaborator Author

wolny commented Apr 12, 2023

yeah, I agree to that. Then we should add some simple logic to handle that

@lorenzocerrone
Copy link
Collaborator

lorenzocerrone commented Apr 12, 2023

Let's add more metadata to the model_zoo.yaml, something like:

generic_confocal_3D_unet:
  model_url: https://zenodo.org/record/7768223/files/unet3d-arabidopsis-ovules-confocal-ds2x.pytorch
  resolution: [0.235, 0.150, 0.150]
  description: "Unet trained on confocal images of Arabidopsis Ovules on 1/2-resolution in XY with BCEDiceLoss."
  dimensionality: "3D"
  model_name: "UNet3D"
  modality: "confocal"
  recomended_patch_size: [40, 160, 160]
  output: "boundaries" 

PS we need to be careful with this it might break back-compatibility

@lorenzocerrone lorenzocerrone changed the title Select only 2D or only 3D models when 'trying all available models' Better model selection Apr 13, 2023
@lorenzocerrone
Copy link
Collaborator

lorenzocerrone commented Apr 13, 2023

TODOs:

  • checkboxs for dimensionality
  • dropdown for modality
  • remove parse patch_size from config
  • dropdown for output

This was referenced Apr 13, 2023
@lorenzocerrone
Copy link
Collaborator

fixed in #149

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

No branches or pull requests

2 participants