juliandewit / kaggle_ndsb2017

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

step2_train_nodule_detector.py ValueError: output of generator should be a tuple #11

Open louiskoo520 opened 7 years ago

louiskoo520 commented 7 years ago

image

juliandewit commented 7 years ago

I cannot run the debugger but do you have traindata in place ?

louiskoo520 commented 7 years ago

Thanks.I just place wrong place. Besides why file trained_model.rar cannot download ?

juliandewit commented 7 years ago

Please try again.. It seems to work now. https://retinopaty.blob.core.windows.net/ndsb3/trained_models.rar

juliandewit commented 7 years ago

I cannot run the debugger but do you have the trained model in place ?

louiskoo520 commented 7 years ago

In step4_train_submissions , variable 'extension' is assigned at this: for extension in extensions: src_dir = settings.NDSB3_NODULE_DETECTION_DIR + "predictions" + str(int(magnification * 10)) + extension + "/" pred_nodules_df = pandas.read_csv(src_dir + patient_id + ".csv") pred_nodules_df = pred_nodules_df[pred_nodules_df["diameter_mm"] > 0] pred_nodules_df = pred_nodules_df[pred_nodules_df["nodule_chance"] > nodule_th] pred_df_list.append(pred_nodules_df)

Traceback (most recent call last): File "D:/Python/code/Kaggle/Bowl2017/step4_train_submissions.py", line 397, in combine_nodule_predictions(None, train_set=False, nodule_th=0.7, extensions=[model_variant]) File "D:/Python/code/Kaggle/Bowl2017/step4_train_submissions.py", line 130, in combine_nodule_predictions target_path = settings.BASE_DIR + "xgboost_trainsets/" "train" + extension + ".csv" if train_set else settings.BASE_DIR + "xgboost_trainsets/" + "submission" + extension + ".csv" UnboundLocalError: local variable 'extension' referenced before assignment

louiskoo520 commented 7 years ago

dicom raw data must have to include stage2 with this code ? I find you use file combine_nodule_predictions.csv in function 'combine_nodule_predictions'?