Add `CalcualteInstanceSegmentationMap` Transform
Fixes #5100.
Description
Add a post transform to process NP branch output(an output branch in HoVerNet) which turns the probability map from the network into the instance segmentation result.
Types of changes
- [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 htmlcommand in thedocs/folder.
@KumoLiu Could you please review items in the PR descriptions, check everything that you have already done, and remove any one that is not relevant (e.g. Breaking change...)?
Hi @drbeh, I have reviewed items in the PR descriptions, check everything that I have already done, and removed irrelevant lines. Could you please help review this PR and let me know if you have any comments? Thanks in advance!
Hi @JHancox @Nic-Ma @drbeh @wyli, I have just added more unittests using the data @JHancox shared with me. Could you please help review it again, and let me know if you have any comments? Thanks!
Hi @drbeh, do you have any comments on this PR? If not, maybe we can merge this PR first and after you finished #5189 I will create a new PR to update this transform, then it could be easy to go on with the whole post-process pipeline. Thanks in advance!
Hi @wyli ,
Should we put the
tests/testing_data/hovernet_test_data.npzto somewhere else?Thanks.
sure I upload it to here https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/hovernet_test_data.npz, it seems it's not used anywhere in the code
Hi @wyli , Should we put the
tests/testing_data/hovernet_test_data.npzto somewhere else? Thanks.sure I upload it to here https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/hovernet_test_data.npz, it seems it's not used anywhere in the code
Hi @wyli, I previously used this data for generating content checks, but since Sobel and Gaussian can cause subtle differences in the results, I removed the content checks and currently only have the shape tests. I will remove the test data. Sorry for any misunderstanding I caused, thanks!
Hi @drbeh and @wyli, do you have any other comments or advice on this PR?
The mean dice on three-fold cross-validation for Lizard dataset is 0.8256.
/black
/build
/build
/build