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

Update DeepEdit infer to accept clicks from viewer #491

Merged
merged 11 commits into from
Aug 28, 2023

Conversation

diazandr3s
Copy link
Collaborator

Update DeepEdit Infer config to accept clicks from the user

Signed-off-by: Andres <diazandr3s@gmail.com>
@diazandr3s diazandr3s requested a review from tangy5 August 20, 2023 23:12
Signed-off-by: Andres <diazandr3s@gmail.com>
@tangy5
Copy link
Collaborator

tangy5 commented Aug 21, 2023

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
Copy link
Collaborator

Nic-Ma commented Aug 23, 2023

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.

yiheng-wang-nv and others added 4 commits August 23, 2023 23:20
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: Andres <diazandr3s@gmail.com>
Signed-off-by: Andres <diazandr3s@gmail.com>
@Nic-Ma
Copy link
Collaborator

Nic-Ma commented Aug 24, 2023

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.

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@yiheng-wang-nv
Copy link
Collaborator

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
Copy link
Collaborator Author

diazandr3s commented Aug 24, 2023

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: Project-MONAI/MONAILabel#1527

Thanks again!

@tangy5
Copy link
Collaborator

tangy5 commented Aug 24, 2023

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
Copy link
Collaborator Author

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
Copy link
Collaborator

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
Copy link
Collaborator

/build

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@yiheng-wang-nv
Copy link
Collaborator

/build

Copy link
Collaborator

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.
@yiheng-wang-nv Do you have any other comments?
If not, let's merge it.

Thanks.

@yiheng-wang-nv yiheng-wang-nv merged commit 1985ff5 into Project-MONAI:dev Aug 28, 2023
yiheng-wang-nv added a commit to yiheng-wang-nv/model-zoo that referenced this pull request Jul 29, 2024
Update DeepEdit Infer config to accept clicks from the user

---------

Signed-off-by: Andres <diazandr3s@gmail.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yiheng Wang <vennw@nvidia.com>
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

Successfully merging this pull request may close these issues.

4 participants