Brain-tumor-segmentation icon indicating copy to clipboard operation
Brain-tumor-segmentation copied to clipboard

ValueError: bad axis2 argument to swapaxes

Open sara-kassani opened this issue 7 years ago • 20 comments

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.

sara-kassani avatar Apr 05 '18 20:04 sara-kassani

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

Issam28 avatar Apr 05 '18 23:04 Issam28

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

sara-kassani avatar Apr 05 '18 23:04 sara-kassani

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

Issam28 avatar Apr 06 '18 15:04 Issam28

I am also getting the same error

ritwik12 avatar Apr 16 '18 17:04 ritwik12

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

sara-kassani avatar Apr 16 '18 17:04 sara-kassani

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

Issam28 avatar Apr 16 '18 17:04 Issam28

@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.

ritwik12 avatar Apr 16 '18 18:04 ritwik12

@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.

sara-kassani avatar Apr 16 '18 20:04 sara-kassani

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

ritwik12 avatar Apr 16 '18 20:04 ritwik12

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

agungfathur avatar Apr 28 '18 09:04 agungfathur

@agungfathur check the filepath of the dataset

Issam28 avatar May 05 '18 23:05 Issam28

Please could you provide me the output?

TigabuYaya avatar Oct 14 '18 05:10 TigabuYaya

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.

TigabuYaya avatar Nov 25 '18 14:11 TigabuYaya

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

takrouni avatar Nov 29 '18 09:11 takrouni

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

your email, please.

TigabuYaya avatar Nov 30 '18 12:11 TigabuYaya

Hello, Same problem :(

Le mer. 5 déc. 2018 à 7:02 PM, Mickind [email protected] a écrit :

Hello everyone, How can I find the Brats2017 dataset? I think, without it, I can not execute extract_patches.py. @TigabuYaya https://github.com/TigabuYaya Could you please kindly pass me by email? My e-mail: [email protected]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Issam28/Brain-tumor-segmentation/issues/2#issuecomment-444582992, or mute the thread https://github.com/notifications/unsubscribe-auth/AO_bWOBzR42xpVzVNXoUJRS2efQhn8L6ks5u2ApQgaJpZM4TJHBb .

takrouni avatar Dec 05 '18 18:12 takrouni

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

Issam28 avatar Dec 05 '18 19:12 Issam28

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([email protected])? please!!!

Wonkun-Chen avatar Apr 12 '20 12:04 Wonkun-Chen

I hv z dataset

On Sun, Apr 12, 2020, 15:13 Jukern-Steven [email protected] wrote:

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([email protected])? please!!!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Issam28/Brain-tumor-segmentation/issues/2#issuecomment-612605119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHX2H6CON4O3YPOQHSVP7CDRMGV5NANCNFSM4EZEOBNQ .

TigabuYaya avatar Apr 13 '20 18:04 TigabuYaya

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!

cqlouis avatar Dec 18 '20 07:12 cqlouis