Skip to content
Snippets Groups Projects
Commit a39c9657 authored by Nuno Pimpão Santos Martins's avatar Nuno Pimpão Santos Martins
Browse files

update iou restore script for latest quantificaitons

parent 4607594a
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ from tqdm import tqdm ...@@ -11,7 +11,7 @@ from tqdm import tqdm
# --- # ---
# Load threshold data # Load threshold data
# --- # ---
table_path = 'w:\\NPC_adult_new\\quantification_data\\iou_quantification\\iou_quantification_fcenettoinput_2_2023-07-10\\' table_path = 'w:\\NPC_adult_new\\quantification_data\\iou_quantification\\iou_quantification_fcenet_newmasks_2023-07-22\\'
table_list = os.listdir(table_path) table_list = os.listdir(table_path)
table_list.sort() table_list.sort()
table_list = [x for x in table_list if x.find('.csv') > 0] table_list = [x for x in table_list if x.find('.csv') > 0]
...@@ -20,24 +20,24 @@ table_list = [x for x in table_list if x.find('.csv') > 0] ...@@ -20,24 +20,24 @@ table_list = [x for x in table_list if x.find('.csv') > 0]
# Data Import # Data Import
# --- # ---
# results paths # results paths
results_path = 'w:\\NPC_adult_new\\dl_training\\results\\contrastenhance_128x128px_maeloss_20pxblurrad_poissonnoise_adaptive0p6to0p5_unet5\\' results_path = 'w:\\NPC_adult_new\\dl_training\\fcenet\\results\\'
pred1_mask_path = results_path+'results_20230707_biasfree\\' pred1_mask_path = results_path+'results\\'
pred1_suffix_substring = '.tif' pred1_suffix_substring = '_pred_renorm.tif'
pred1_save_path = os.path.join(pred1_mask_path, 'masks') pred1_save_path = os.path.join(pred1_mask_path, 'masks')
if not os.path.exists(pred1_save_path): if not os.path.exists(pred1_save_path):
os.mkdir(pred1_save_path) os.mkdir(pred1_save_path)
pred2_mask_path = results_path+'results_20230707_biasfree_doublerestore\\' pred2_mask_path = results_path+'results_x2\\'
pred2_suffix_substring = '.tif' pred2_suffix_substring = '_x2.tif'
pred2_save_path = os.path.join(pred2_mask_path, 'masks') pred2_save_path = os.path.join(pred2_mask_path, 'masks')
if not os.path.exists(pred2_save_path): if not os.path.exists(pred2_save_path):
os.mkdir(pred2_save_path) os.mkdir(pred2_save_path)
pred3_mask_path = results_path+'results_20230708_biasfree_x3\\' pred3_mask_path = results_path+'results_x3\\'
pred3_suffix_substring = '.tif' pred3_suffix_substring = '_x3.tif'
pred3_save_path = os.path.join(pred3_mask_path, 'masks') pred3_save_path = os.path.join(pred3_mask_path, 'masks')
if not os.path.exists(pred3_save_path): if not os.path.exists(pred3_save_path):
...@@ -69,7 +69,7 @@ for table_name in tqdm(table_list, total=len(table_list)): ...@@ -69,7 +69,7 @@ for table_name in tqdm(table_list, total=len(table_list)):
# print('line len: ', data_table[0].shape) # print('line len: ', data_table[0].shape)
table_name_noext = table_name[12:table_name.index('_mask')] table_name_noext = table_name[12:table_name.index('.csv')]
print(table_name_noext) print(table_name_noext)
time_image = time.time() time_image = time.time()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment