step6_predict_nodules.py 文件源码

python
阅读 23 收藏 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.TEST_SUBSET_START_INDEX, settings.TEST_SUBSET_TRAIN_NUM):
        src_dir = settings.RAW_SRC_DIR + "test_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-00395' or patient_id == 'LKDS-00434'or patient_id == 'LKDS-00384' or patient_id == 'LKDS-00186':
                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"])
    print("len of can:",len(df_patient_list))
    df_patient_list.to_csv("./output_val/prediction_submisssion_luna_manal.csv", index=False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号