-
Notifications
You must be signed in to change notification settings - Fork 12
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
Axis error and Value error in processmgz #4
Comments
Hi, hope this message finds you well. For the first bug, I think it's because your input matrix size is not (256, 256, 256). Would you pls double check your input matrix size? The secound bug is also a size error, would you please check the shape of this data_new before this line and send it to me (121 data_new = np.expand_dims(data_new, axis=4) # reshape the brain MRI from 3D to 4D)? |
Hello Chenzhong, glad to hear from you. It looks like the error occurs far earlier than the line you called out above. I added print statements to lines 19 and 20 of the preprocess.py file. This is what I obtained when running the sample.mgz file, which is obtained from here
Similarly, when I run it on my own data, I also get an error:
When both mgz files are in the brain_mri folder, each in its separate folder, this is what I see:
|
Hi! By any chance you'd have updates on this? @chenzhoy |
Hi. Sorry for the late update. It looks like your input size is (1, 128, 128, 64) which suggest that the input MRI size could be (1, 256, 256, 128). However, our model can only support MRI with 256x256x256 which caused this error. |
Would you recommend zero padding or interpolation, in this case?
…________________________________
From: chenzhoy ***@***.***>
Sent: Thursday, April 25, 2024 11:32 PM
To: irimia-laboratory/USC_BA_estimator ***@***.***>
Cc: Hui Xin Ng ***@***.***>; Author ***@***.***>
Subject: Re: [irimia-laboratory/USC_BA_estimator] Axis error and Value error in processmgz (Issue #4)
Hi. Sorry for the late update. It looks like your input size is (1, 128, 128, 64) which suggest that the input MRI size could be (1, 256, 256, 128). However, our model can only support MRI with 256x256x256 which caused this error.
—
Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AEAMWV53UZ2YODVFHQVLBSLY7F77PAVCNFSM6AAAAABDPZ2JMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZYGI3TSMZZGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I am sorry but I think padding may highly influence the model's performance. |
I've tried running
mainfunction
provided in the example code on two different mgz files:the first one is from my dataset, the second file is the standard sample file that comes with freesurfer software, and have run into different errors in both. Any pointers would be helpful, thank you!
This is the error when I run it on one test subject from my own dataset.
The sample freesurfer file is $FREESURFER_HOME/subjects/sample-001.mgz
This is the error:
The text was updated successfully, but these errors were encountered: