kaggle_ndsb2017 icon indicating copy to clipboard operation
kaggle_ndsb2017 copied to clipboard

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

Open louiskoo520 opened this issue 7 years ago • 6 comments

image

louiskoo520 avatar Jul 11 '17 06:07 louiskoo520

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

juliandewit avatar Jul 11 '17 18:07 juliandewit

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

louiskoo520 avatar Jul 13 '17 02:07 louiskoo520

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

juliandewit avatar Jul 13 '17 19:07 juliandewit

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

juliandewit avatar Jul 14 '17 11:07 juliandewit

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 avatar Jul 16 '17 12:07 louiskoo520

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'?

louiskoo520 avatar Jul 16 '17 13:07 louiskoo520