Skip to content
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

ValueError: bad axis2 argument to swapaxes #2

Open
sara-kassani opened this issue Apr 5, 2018 · 20 comments
Open

ValueError: bad axis2 argument to swapaxes #2

sara-kassani opened this issue Apr 5, 2018 · 20 comments

Comments

@sara-kassani
Copy link

In line 74 (gt_im = np.swapaxes(self.train_im, 0, 1)[4]) at extract_patches.py I will get the following error.
ValueError: bad axis2 argument to swapaxes.

@Issam28
Copy link
Owner

Issam28 commented Apr 5, 2018

Are you using Brats2017 datasets ? which numpy version do you use?

@sara-kassani
Copy link
Author

I'm using brats 2017 and my numpy version is 1.14.2.

@Issam28
Copy link
Owner

Issam28 commented Apr 6, 2018

it's really weird in my local machine i can't reproduce the error can you give more details ?

@ritwik12
Copy link

I am also getting the same error

@sara-kassani
Copy link
Author

I've run the code on google colab and the problem was solved. I guess the error caused because of memory error.

@Issam28
Copy link
Owner

Issam28 commented Apr 16, 2018

yes it's probably because of memory when you transform large numpy arrays into np.float you'll quickly run out of memory , i've done this project on a machine that has 64 GO of RAM and i've tested it on google colab which has 13GO of ram and it worked

@ritwik12
Copy link

@sara-kassani I have never used colab. Can you guide me how to use this project for colab? if it's not a long procedure for you to explain.

@sara-kassani
Copy link
Author

@ritwik12 It's not easy to work with google colab. I've also worked with http://floydhub.com/ and http://paperspace.com/. I recommend you paperspace.

@ritwik12
Copy link

@sara-kassani ohk, thanks a lot for your help.

@agungfathur
Copy link

i try the program, but still error in line 74 with same error. i already try it on google colabs. any solutions?

@Issam28
Copy link
Owner

Issam28 commented May 5, 2018

@agungfathur check the filepath of the dataset

@TigabuYaya
Copy link

Please could you provide me the output?

@TigabuYaya
Copy link

In line 74 (gt_im = np.swapaxes(self.train_im, 0, 1)[4]) at extract_patches.py I will get the following error.
ValueError: bad axis2 argument to swapaxes.

This is because your file paths, @ line 216 and 217 ( path_HGG = glob('Brats2017/Brats17TrainingData/HGG/')
path_LGG = glob('Brats2017/Brats17TrainingData/LGG/
')), are not correctly specified.

@takrouni
Copy link

Good morning,
Please, i need urgently the Brats2017 dataset
Thank you.

@TigabuYaya
Copy link

Good morning,
Please, i need urgently the Brats2017 dataset
Thank you.

your email, please.

@takrouni
Copy link

takrouni commented Dec 5, 2018 via email

@Issam28
Copy link
Owner

Issam28 commented Dec 5, 2018

for everyone's asking for BraTS 2017 or BraTS 2018 datasets you can request them via this website : https://ipp.cbica.upenn.edu/

@Wonkun-Chen
Copy link

Hello, is there anybody could send me a BraTS2017 datasets please? when I wrote an email to cbica ask for the datasets, they say they dont provide this datasets, only the latest one, so im here search for it. who can send it to my email(15689432890@163.com)? please!!!

@TigabuYaya
Copy link

TigabuYaya commented Apr 13, 2020 via email

@cqlouis
Copy link

cqlouis commented Dec 18, 2020

In line 74 (gt_im = np.swapaxes(self.train_im, 0, 1)[4]) at extract_patches.py I will get the following error.
ValueError: bad axis2 argument to swapaxes.

This is because your file paths, @ line 216 and 217 ( path_HGG = glob('Brats2017/Brats17TrainingData/HGG/') path_LGG = glob('Brats2017/Brats17TrainingData/LGG/')), are not correctly specified.

yes!
I met the same problem, after I changed the path to absolute path , it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants