-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
9 intensity normalisation transform #25
Conversation
please update based on #9 (comment) |
design according to our latest discussion: 1. input data is dict format with keys for fields. 2. only based on PyTorch and data shape is channel_last.
8cd6e33
to
41fd036
Compare
Hi @wyli @ericspod @atbenmurray , I already update the code and PR description according to our latest discussion. |
* Adding script to run unit tests and example test cases (#29) Adding script to run unit tests and example test cases * initial unit tests for dice loss (#27) * initial unit tests for 2d/3d unet * unit tests update - triggering unit tests via github workflow - renamed testconvolutions.py to test_convolutions.py - test unet test cases as variables for readability * initial unit tests for 2d/3d unet (#26) * initial unit tests for 2d/3d unet * unit tests update - triggering unit tests via github workflow - renamed testconvolutions.py to test_convolutions.py - test unet test cases as variables for readability * 14 code examples of monai input data pipeline (#24) * fixes cardiac example * update example cardiac segmentation * Create .gitlab-ci.yml (#30) an initial step towards #19 * tests intensity normalizer - revised to support both `[key]` and `key` as an input for apply_keys - added `NumpyImageTestCase2D` and `TorchImageTestCase2D` * style updates and new test cases: - adding copyright notice - validate user input before setting class member - one line space after copyright - testing multiple keys input data Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Co-authored-by: Isaac Yang <isaacy@nvidia.com>
@ericspod could you review this PR? mainly added a minimal transform interface, and updated |
Hi @ericspod @atbenmurray @wyli , I updated this PR to remove dict-key processing and be compatible with Eric's other transforms. |
2d9c037
to
a2a4e23
Compare
self.assertTrue(np.allclose(normalised, expected)) | ||
|
||
|
||
if __name__ == '__main__': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally you don't need a main section in the test case scripts, you can run tests from the root directory with
python -m unittest test/test_intensity_normalizer.py
It doesn't hurt to be here though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! @atbenmurray could you please update the contribution guidelines about running all unit tests and single unit test . PR for new features should include new unit tests and inherit test case base classes.
Beyond the issue with the CI pipeline not completing the code is good to go. |
Hi @ericspod , Thanks for your quick review! |
I would just go ahead with the merge. |
Cool, thanks! |
Hi All,
This PR implemented the intensity normalization transform for task #9
Designed according to our latest discussion:
1. input data is dict format with keys for fields.
2. only based on PyTorch and data shape is channel_last.
Could you please help review it when you are available?
Thanks in advance.
I verified this PR locally with the below program: