juliandewit / kaggle_ndsb2017

Kaggle datascience bowl 2017
MIT License
623 stars 290 forks source link

ValueError: bad axis2 argument to swapaxes #42

Closed sathyapatel closed 6 years ago

sathyapatel commented 6 years ago

i am getting error in step1_preprocess_luna16.py

Computer: DESKTOP-AVK4MS4 0 patient: 1.3.6.1.4.1.14519.5.2.1.6279.6001.105756658031515062000744821260 Img array: (121, 512, 512) Annos: 0 Origin (x,y,z): [-198.100006 -195. -335.209991] Spacing (x,y,z): [ 0.76171899 0.76171899 2.5 ] Rescale: [ 0.76171899 0.76171899 2.5 ] Direction: [ 1. 0. 0. 0. 1. 0. 0. 0. 1.] Direction: [ 1. 0. 0. 0. 1. 0. 0. 0. 1.] (390, 390) 1 patient: 1.3.6.1.4.1.14519.5.2.1.6279.6001.108197895896446896160048741492 Img array: (119, 512, 512) Annos: 1 Origin (x,y,z): [-182.5 -190. -313.75] Spacing (x,y,z): [ 0.74218798 0.74218798 2.5 ] Rescale: [ 0.74218798 0.74218798 2.5 ] Direction: [ 1. 0. 0. 0. 1. 0. 0. 0. 1.] Direction: [ 1. 0. 0. 0. 1. 0. 0. 0. 1.] (380, 380) Node org (x,y,z,diam): (-100.57, 67.26, -231.82, 6.44) Node tra (x,y,z,diam): (110.0, 347.0, 33.0) Traceback (most recent call last): File "step1_preprocess_luna16.py", line 718, in process_pos_annotations_patient2() File "step1_preprocess_luna16.py", line 642, in process_pos_annotations_patient2 process_pos_annotations_patient(src_path, patient_id) File "step1_preprocess_luna16.py", line 280, in process_pos_annotations_patient center_float_percent = center_float_rescaled / patient_imgs.swapaxes(0,2).shape ValueError: bad axis2 argument to swapaxes

juliandewit commented 6 years ago

Check the value of patient_imgs The first patient went ok.. So there must be something with the data of the 2nd. I cannot debug this.

sathyapatel commented 6 years ago

Thank you for your reply Julian. I fixed that 3 hours ago and CSV files also generated.