-
Notifications
You must be signed in to change notification settings - Fork 1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
ImportError: cannot import name 'NiftiDataset' from 'monai.data' (/usr/local/lib/python3.7/dist-packages/monai/data/__init__.py) #2886
Comments
Hi @Sebagam , Thanks for your interest here. Thanks. |
Ok, thanks. |
Maybe you can try pip install monai==0.4.0? Thanks. |
But I strongly suggest you to update with MONAI v0.6 as we integrated many enhancements. Thanks. |
Hi Nic,
I think that there is an issue with the transformations, here is the code
if you want to check:
https://colab.research.google.com/drive/1XcHHnNvxVCbTDV7bgnWHrSjGD7XKzY_f#scrollTo=ec0QWW-Q69N6
Best,
Sebastian
…On Fri, Sep 3, 2021 at 8:33 PM Nic Ma ***@***.***> wrote:
But I strongly suggest you to update with MONAI v0.6 as we integrated many
enhancements.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7M2OI5LP57TQHA5SKY4STUAFLOFANCNFSM5DLSHURQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @Sebagam , If you check the error log, you can find that the data shape is wrong: Thanks. |
Thank you, Nic,
Do you know what the following issue mean?
RuntimeError: DataLoader worker (pid(s) 1038) exited unexpectedly
…On Sun, Sep 5, 2021 at 11:52 AM Nic Ma ***@***.***> wrote:
Hi @Sebagam <https://github.com/Sebagam> ,
If you check the error log, you can find that the data shape is wrong:
Shape: (1, 166, 256, 256, 1)
Actually your data already has channel dim at the last dim, you should not
use AddChannel transform, you can use EnsureChannelFirst or AsChannelFirst
transform.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7M2OO3XFR74B774XAQDTLUAN74TANCNFSM5DLSHURQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @Sebagam , I think maybe it's some PyTorch multi-processing issue? Can you try again with Thanks. |
Hi Nic,
Thanks for your help.
I'm running the last tutorial for the 3D classifications.
Apparently, there is an incompatibility between the shape of my
tensor: torch.Size([2,
166, 256, 256, 1])
and the model
https://colab.research.google.com/drive/1mz0YB0I-t3B0ZwPzazN9QlgTPnv9pZFJ?usp=sharing
I'm missing another transformation?
…On Mon, Sep 6, 2021 at 8:52 PM Nic Ma ***@***.***> wrote:
Hi @Sebagam <https://github.com/Sebagam> ,
I think maybe it's some PyTorch multi-processing issue? Can you try again
with num_workers=0?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7M2OJYKSBEY6QUOLM4WRLUAVH3VANCNFSM5DLSHURQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @Sebagam , Seems something wrong with your data shape? Thanks. |
I got this error now:
ValueError: meta_dict not available, EnsureChannelFirst is not in use.
…On Wed, Sep 8, 2021 at 8:59 PM Nic Ma ***@***.***> wrote:
Hi @Sebagam <https://github.com/Sebagam> ,
Seems something wrong with your data shape?
Could you please help add EnsureChannelFirst transform at the beginning
of your transform chain?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7M2OKHVIK3RWSIQZGUKXLUA72E3ANCNFSM5DLSHURQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @Sebagam , As you are using array-based transforms instead of dict-based transforms, it may not work well. Thanks. |
Thanks Nic, it's working now.
I have a question.
Do you know why I'm getting the best metric as a zero value? The loss
appears to be decreasing across epochs.
https://colab.research.google.com/drive/1mz0YB0I-t3B0ZwPzazN9QlgTPnv9pZFJ#scrollTo=kJrv4lBIALU7
Best,
Sebastian
…On Thu, Sep 9, 2021 at 11:01 AM Nic Ma ***@***.***> wrote:
Hi @Sebagam <https://github.com/Sebagam> ,
As you are using array-based transforms instead of dict-based transforms,
it may not work well.
Could you please help change to AsChannelFirst transform?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7M2OO4E53G4L3223NSJ4TUBC42PANCNFSM5DLSHURQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I think that I managed to fix it.
Do you know how to turn off this output?
INFO:nibabel.global:pixdim[0] (qfac) should be 1 (default) or -1;
setting qfac to 1
/usr/local/lib/python3.7/dist-packages/monai/data/utils.py:542:
UserWarning: Modifying image pixdim from [1.1999999 1. 1.
0. ] to [ 1.19999993 1. 1. 218.40411641]
warnings.warn(f"Modifying image pixdim from {pixdim} to {norm}")
Thanks
…On Thu, Sep 9, 2021 at 11:58 AM Nic Ma ***@***.***> wrote:
I think maybe you can print out the model predictions, see whether it's
overfitting?
@wyli <https://github.com/wyli> @ericspod <https://github.com/ericspod>
Could you guys help please share some comments about the training status?
Thanks in advance.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7M2OKXRI2LFE3ITJEKVZLUBDDQVANCNFSM5DLSHURQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I think you can turn off all the warnings, referring to: Thanks. |
Hi Nic,
Yes, I know that command.
The problem is the Nibabel information messages:
INFO:nibabel.global:pixdim[0] (qfac) should be 1 (default) or -1;
setting qfac to 1
pixdim[0] (qfac) should be 1 (default) or -1; setting qfac to 1
Do you know how to suppress them?
Thanks
…On Thu, Sep 9, 2021 at 8:05 PM Nic Ma ***@***.***> wrote:
I think you can turn off all the warnings, referring to:
https://stackoverflow.com/questions/14463277/how-to-disable-python-warnings
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7M2OOISBSPLX6MWAA5TE3UBE4VDANCNFSM5DLSHURQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @wyli , Do you know something about this Nibabel warning? Thanks in advance. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi all,
When trying to run MONAI on google colab:
ImportError: cannot import name 'NiftiDataset' from 'monai.data' (/usr/local/lib/python3.7/dist-packages/monai/data/init.py)
This issue was not present a few months ago.
Best,
Sebastian
The text was updated successfully, but these errors were encountered: