Project-MONAI / model-zoo

MONAI Model Zoo that hosts models in the MONAI Bundle format.
Apache License 2.0
174 stars 65 forks source link

Update DeepEdit infer to accept clicks from viewer #491

Closed diazandr3s closed 10 months ago

diazandr3s commented 11 months ago

Update DeepEdit Infer config to accept clicks from the user

tangy5 commented 11 months ago

HI @diazandr3s , thanks for the PR, let me also try this bundle in our MONAI Label with 3D Slicer and OHIF plugins. This bundle will be a big hit to many projects. Will comment, thank you.

Nic-Ma commented 11 months ago

Hi @diazandr3s ,

Please also update the README to add the expected input data format if having clicks and the CLI command to run it.

Thanks in advance.

Nic-Ma commented 11 months ago

Hi @diazandr3s @yiheng-wang-nv ,

Thanks for the quick update. Let's suppose to put the guidance and image together in the input dict, is it possible? Then no need to provide it in the CLI.

Thanks.

yiheng-wang-nv commented 11 months ago

Hi @diazandr3s @tangy5 , I pushed a new commit with unit test changes and readme updates, could you please help to double confirm it? Thanks!

diazandr3s commented 11 months ago

Hi @diazandr3s @tangy5 , I pushed a new commit with unit test changes and readme updates, could you please help to double confirm it? Thanks!

Hi @yiheng-wang-nv,

Thanks for the update! It is working on my end. I know MONAI Label is not a priority for this, but it is also working there. here is the PR: https://github.com/Project-MONAI/MONAILabel/pull/1527

Thanks again!

tangy5 commented 11 months ago

Hi All, one more thing to think about here, if a foreground click is not associate with any organ, how can we handle the click. We will need a logic to define coordinate alone.

how about: {"image": "example.nii.gz", "foreground": [], "background": [], "spleen": [[I1, J1, K1], [I2, J2, K2]]}

diazandr3s commented 11 months ago

Hi All, one more thing to think about here, if a foreground click is not associate with any organ, how can we handle the click. We will need a logic to define coordinate alone.

how about: {"image": "example.nii.gz", "foreground": [], "background": [], "spleen": [[I1, J1, K1], [I2, J2, K2]]}

Good point! However, that shouldn't be an issue in DeepEdit. This transform only reads the points for the labels defined in the configs file: https://github.com/Project-MONAI/MONAI/blob/dev/monai/apps/deepedit/transforms.py#L679

yiheng-wang-nv commented 11 months ago

Hi All, one more thing to think about here, if a foreground click is not associate with any organ, how can we handle the click. We will need a logic to define coordinate alone.

how about: {"image": "example.nii.gz", "foreground": [], "background": [], "spleen": [[I1, J1, K1], [I2, J2, K2]]}

Hi @tangy5 , I think for this bundle, as @diazandr3s said, since label_name defines it only has background and spleen, we may not need foreground.

yiheng-wang-nv commented 11 months ago

/build

yiheng-wang-nv commented 11 months ago

/build