-
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
Why the data shape are different through transform "spacingd. #5935
Comments
thanks @xxsxxsxxs666 for reporting the issue, while I think the shape inconsistency could be addressed by using the MONAI/monai/apps/auto3dseg/transforms.py Lines 25 to 32 in f9842c0
I'm still not sure why this only happens with cacachedatset. Could you please share that test data if possible? I'm trying to reproduce the issue. |
Thanks for reply. It's very wierd that this problem only happen during training state, I can't recurrent that fault only using val dataset. But I still find something strange that shape of AI07_0012_01_B_diast_0.25mm.nii.gz after transform varies when the dataset's order is different. Sometime the shape is 639, but other times 640.Test code and data are in attachment.
19 熊小松
***@***.***
…------------------ 原始邮件 ------------------
发件人: "Project-MONAI/MONAI" ***@***.***>;
发送时间: 2023年2月6日(星期一) 下午5:39
***@***.***>;
抄送: "19 ***@***.******@***.***>;
主题: Re: [Project-MONAI/MONAI] Why the data shape are different through transform "spacingd. (Issue #5935)
thanks @xxsxxsxxs666 for reporting the issue, while I think the shape inconsistency could be addressed by using the EnsureSameShaped transform
https://github.com/Project-MONAI/MONAI/blob/f9842c0dda70714c826eeb8b12bbf93d987a0584/monai/apps/auto3dseg/transforms.py#L25-L32
I'm still not sure why this only happens with cacachedatset. Could you please share that test data if possible? I'm trying to reproduce the issue.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
从QQ邮箱发来的超大附件
problem.7z (907.87M, 2023年03月09日 11:01 到期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=5a613130c24221a4ae1ff2764766514c070406530552075548535508074b575001041c095052524e045707035251075407020101616c6313170e535c040b4d541f610c&code=ea10afcc
|
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
thanks for the details @xxsxxsxxs666, I'm able to reproduce the issue and submitting a pull request #5950 to fix it. The issue was with one of the images pixdim 0.346909 which was close to the target 0.35, the spacing transform correctly skipped the resampling but there's a buggy side-effect of assigning 0.346909 to |
Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5935 ### Description assigning `out_d[idx]` in the `__call__` shouldn't change `self.pixdim` in Spacing ### 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 <wenqil@nvidia.com>
Discussed in #5934
Originally posted by xxsxxsxxs666 February 3, 2023
The shape and metadata are the same between image and label
this problem only happen when I use cachedataset. Nothing went wrong when I use normal dataset.
The text was updated successfully, but these errors were encountered: