Conversation
|
Hi @JHancox , I would suggest to put this loss implementation in: What do you think? Thanks. |
Thanks @Nic-Ma - I see your logic and it would make sense. On the other hand HoverNet is already in the monai/networks/nets branch and so we'd probably need to move this too. |
|
Hi @JHancox , I think the Thanks. |
|
Thanks @Nic-Ma. |
|
Hi @Nic-Ma @wyli @rijobro @ericspod @yiheng-wang-nv, It seems that it is related to SobelGradients but do you know what's the issue? Thanks for your help. |
|
Hi @benjamin-gorman , As your error message shows: Thanks. |
I think the problem is that SobelGradients is a Transform, which is a Callable and I don't think TS supports the Callable type. Therefore, perhaps we might refactor SobelGradients so that it can be used as a Tensor-returning class and, perhaps wrap that in the Transform interface. ? Oh, and did you mean @drbeh ? :) |
Hi @Nic-Ma, @JHancox, this transform is already a Tensor-returning class but the issue with torch script is that it is very limited in the scope of what it can support. https://pytorch.org/docs/stable/jit_unsupported.html#jit-unsupported @Nic-Ma do we need the loss function to be torch scriptable? I am not sure if it is worth spending more time on this to make it to work with torch script (if possible at all). If it is not required, I would suggest to move forward without it. |
|
Hi @drbeh , Thanks for the quick update. Thanks. |
|
agree with @Nic-Ma to remove |
|
/build |
|
Is it ready for review now? Thanks. |
I just need to check with @drbeh whether there was anything else. Will try to get an answer today (in Sweden at the moment). |
|
I try to resolve some failing tests and some formatting, and then it should be ready. I'll request to review afterwards. |
|
/build |
Signed-off-by: Behrooz <[email protected]>
…arge images (Project-MONAI#5297) SlidingWindowInferer: option to adaptively stitch in cpu memory for large images. This adds an option to provide maximum input image volume (number of elements) to dynamically change stitching to cpu memory (to avoid gpu memory crashes). For example with `cpu_thresh=400*400*400`, all input images with large volume will be stitched on cpu. At the moment, a user must decide beforehand, to stitch ALL images on cpu or gpu (by specifying the 'device' parameter). But in many datasets, only a few large images require device==cpu, and running inference on cpu for ALL will be unnecessary slow. It's related to Project-MONAI#4625 Project-MONAI#4495 Project-MONAI#3497 Project-MONAI#4726 Project-MONAI#4588 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <[email protected]> Co-authored-by: Wenqi Li <[email protected]> Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
…5280) Fixes MONAI/apps/Auto3DSeg/bundle_gen.py ### Description Commands ran in subprocess currently cause issues with string formatting and backslashes not being escaped properly. Changing from Back Flash to Forward Slash solves the issue. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Maxime <[email protected]> Signed-off-by: Mingxin Zheng <[email protected]> Signed-off-by: Mingxin Zheng <[email protected]> Co-authored-by: Maxime <[email protected]> Co-authored-by: Mingxin Zheng <[email protected]> Co-authored-by: Mingxin Zheng <[email protected]> Co-authored-by: Mingxin Zheng <[email protected] Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Wenqi Li <[email protected]> Fixes Project-MONAI#5133 ### Description adds a test ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: monai-bot <[email protected]> Co-authored-by: monai-bot <[email protected]> Signed-off-by: Behrooz <[email protected]>
Added the missing docstring entry from the HoVerNetLoss class Signed-off-by: Behrooz <[email protected]>
for more information, see https://pre-commit.ci Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
bhashemian
left a comment
There was a problem hiding this comment.
Hi @JHancox, I believe this PR is almost ready to be merged. I left few minor comments inline. Thanks
…5367) Signed-off-by: Mingxin Zheng <[email protected]> Fixes Project-MONAI#5201 Fixes Project-MONAI#5332 ### Description - Remove deprecated meta_dict usage from Auto3DSeg. - Fix affine -> spacing conversion - Update docstring - Change "pixel_percentage" to "foreground_percentage" to unify foreground "pixel"/"voxel" naming ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] In-line docstrings updated. Signed-off-by: Mingxin Zheng <[email protected]> Signed-off-by: Behrooz <[email protected]>
### Description adding tests for python 3.10 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
for more information, see https://pre-commit.ci Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Moved variables and assigned test inputs to a list Signed-off-by: JHancox <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
|
/build |
Fixes #4672 ### Description Adds the Hovernet Loss, which takes the raw predictions from the HoverNet net and produces a Loss Tensor. Hovernet Loss added along with test script that verfies same results as original TIA version of Hovernet loss. Test script also include synthetic image generation (fixed to deterministic behaviour) N.B. Currently does not include a test function for torch script since the test includes code that torchscipt cannot compile - mainly the SobelGradient and associated functions. Need to resolve this. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Behrooz <[email protected]>
Fixes #4672 ### Description Adds the Hovernet Loss, which takes the raw predictions from the HoverNet net and produces a Loss Tensor. Hovernet Loss added along with test script that verfies same results as original TIA version of Hovernet loss. Test script also include synthetic image generation (fixed to deterministic behaviour) N.B. Currently does not include a test function for torch script since the test includes code that torchscipt cannot compile - mainly the SobelGradient and associated functions. Need to resolve this. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Behrooz <[email protected]>
|
Hi @wyli, sure, I'll look into it. |
Fixes #4672 ### Description Adds the Hovernet Loss, which takes the raw predictions from the HoverNet net and produces a Loss Tensor. Hovernet Loss added along with test script that verfies same results as original TIA version of Hovernet loss. Test script also include synthetic image generation (fixed to deterministic behaviour) N.B. Currently does not include a test function for torch script since the test includes code that torchscipt cannot compile - mainly the SobelGradient and associated functions. Need to resolve this. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Behrooz <[email protected]> Signed-off-by: KumoLiu <[email protected]>
Fixes #4672
Description
Adds the Hovernet Loss, which takes the raw predictions from the HoverNet net and produces a Loss Tensor.
Hovernet Loss added along with test script that verfies same results as original TIA version of Hovernet loss. Test script also include synthetic image generation (fixed to deterministic behaviour)
N.B. Currently does not include a test function for torch script since the test includes code that torchscipt cannot compile - mainly the SobelGradient and associated functions. Need to resolve this.
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.