-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
CodeCamp #141 [Feature] Add BioMedical3DRandomFlip. #2404
Conversation
Yes, I check the information about errors, but I cannot find the reason for the bug of my code. |
4c28e1e
to
115552d
Compare
we are figuring out the bug of the ci test |
ecf0527
to
0731894
Compare
|
||
def __init__(self, | ||
prob: float, | ||
axes: Optional[Tuple[int, ...]] = None, |
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.
axes: Optional[Tuple[int, ...]] = None, | |
axes: Tuple[int, ...], |
I think the axes cannot be None in this transform, and could you give an example about axes in docstring, like the order of axes is ZYX or ZXY?
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.
Okay, the order 'ZXY' is given in docstring.
"""Flip biomedical 3D images and segmentations. Modified from | ||
https://github.com/MIC-DKFZ/batchgenerators/blob/master/batchgenerators/tra | ||
nsforms/spatial_transforms.py # noqa:E501 Copyright 2021 Division of | ||
Medical Image Computing, German Cancer Research Center (DKFZ) and Applied | ||
Computer Vision Lab, Helmholtz Imaging Platform. Licensed under the | ||
Apache-2.0 License Required Keys: | ||
|
||
- img | ||
- gt_seg_map (optional) | ||
Modified Keys: | ||
- img | ||
- gt_seg_map (optional)) | ||
Added Keys: | ||
- do_flip | ||
- flip_axes |
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.
Please other Bio3D transform and refine the docstring
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.
I have refined docstring.
Codecov ReportBase: 83.41% // Head: 83.40% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #2404 +/- ##
===========================================
- Coverage 83.41% 83.40% -0.01%
===========================================
Files 145 145
Lines 8451 8503 +52
Branches 1259 1272 +13
===========================================
+ Hits 7049 7092 +43
- Misses 1194 1197 +3
- Partials 208 214 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
db66709
to
8cede62
Compare
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.
why add a README file
- img | ||
- gt_seg_map (optional) |
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.
- img | |
- gt_seg_map (optional) | |
Required Keys: | |
- img (np.ndarry): Biomedical image with shape (N, Z, Y, X) by default, | |
N is the number of modalities. | |
- gt_seg_map (np.ndarray, optional): Biomedical seg map with shape | |
(Z, Y, X) by default. |
- img | ||
- gt_seg_map (optional) |
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.
- img | |
- gt_seg_map (optional) | |
Required Keys: | |
- img (np.ndarry): Biomedical image with shape (N, Z, Y, X) by default, | |
N is the number of modalities. | |
- gt_seg_map (np.ndarray, optional): Biomedical seg map with shape | |
(Z, Y, X) by default. |
"""Flip biomedical 3D images and segmentations. Modified from | ||
https://github.com/MIC-DKFZ/batchgenerators/blob/master/batchgenerators/tra | ||
nsforms/spatial_transforms.py # noqa:E501 Copyright 2021 Division of | ||
Medical Image Computing, German Cancer Research Center (DKFZ) and Applied | ||
Computer Vision Lab, Helmholtz Imaging Platform. Licensed under the | ||
Apache-2.0 License. |
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.
"""Flip biomedical 3D images and segmentations. Modified from | |
https://github.com/MIC-DKFZ/batchgenerators/blob/master/batchgenerators/tra | |
nsforms/spatial_transforms.py # noqa:E501 Copyright 2021 Division of | |
Medical Image Computing, German Cancer Research Center (DKFZ) and Applied | |
Computer Vision Lab, Helmholtz Imaging Platform. Licensed under the | |
Apache-2.0 License. | |
"""Flip biomedical 3D images and segmentations. | |
Modified from | |
https://github.com/MIC-DKFZ/batchgenerators/blob/master/batchgenerators/transforms/spatial_transforms.py # noqa:E501 | |
Copyright 2021 Division of | |
Medical Image Computing, German Cancer Research Center (DKFZ) and Applied | |
Computer Vision Lab, Helmholtz Imaging Platform. | |
Licensed under the Apache-2.0 License. |
Fix typo in AttnProcessor2_0 symbol.
…mlab#2404) ## Motivation Support for biomedical 3d images augmentation. ## Modification Add BioMedical3DRandomFlip in mmseg/datasets/transforms/transforms.py. Co-authored-by: MeowZheng <meowzheng@outlook.com>
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Support for biomedical 3d images augmentation.
Modification
Add BioMedical3DRandomFlip in mmseg/datasets/transforms/transforms.py.
BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
Add the function to support the flipping for biomedical 3d images and segmentation maps.
Checklist