step6_predict_nodules_validation.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:TC-Lung_nodules_detection 作者: Shicoder 项目源码 文件源码
def get_patient_xyz(path_f):
    candidate_index = 0
    only_patient = "197063290812663596858124411210"
    only_patient = None
    patient_list=[]
    for subject_no in range(settings.VAL_SUBSET_START_INDEX, settings.VAL_SUBSET_TRAIN_NUM):
        src_dir = settings.RAW_SRC_DIR + "val_subset0" + str(subject_no) + "/"
        for src_path in glob.glob(src_dir + "*.mhd"):
            if only_patient is not None and only_patient not in src_path:
                continue
            patient_id = ntpath.basename(src_path).replace(".mhd", "")
            print(candidate_index, " patient: ", patient_id)
            if  patient_id == 'LKDS-00557'or patient_id =='LKDS-00978' or patient_id =='LKDS-00881' or patient_id == 'LKDS-00186' or patient_id=='LKDS-00228' or patient_id=='LKDS-00877':
                continue
            pos_annos = get_patient_xyz_do(src_path, patient_id,path_f)
            patient_list.extend(pos_annos)
            candidate_index += 1
    df_patient_list = pandas.DataFrame(patient_list, columns=["seriesuid", "coordX", "coordY", "coordZ","probability"])
    df_patient_list.to_csv("./output_val/prediction_submission_val3.csv", index=False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号