File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,9 @@ def main(cfg_file_path):
333333 # ------ tagging detections
334334
335335 # we select the threshold which maximizes the f1-score on the val dataset
336+ if 'val' in metrics_cl_df_dict .keys () and CONFIDENCE_THRESHOLD :
337+ logger .error ('The confidence score was determined over the val dataset, but a confidence score is given in the config file.' )
338+ logger .warning ('The confidence score from the config file is ignored.' )
336339 if 'val' in metrics_cl_df_dict .keys ():
337340 selected_threshold = metrics_df_dict ['val' ].loc [metrics_df_dict ['val' ]['f1' ].argmax (), 'threshold' ]
338341 logger .info (f"Tagging detections with threshold = { selected_threshold :.2f} , which maximizes the f1-score on the val dataset." )
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ def main(cfg_file_path):
296296 OTH_LABELS = cfg ['datasets' ]['other_labels' ] if 'other_labels' in cfg ['datasets' ].keys () else None
297297 FP_LABELS = cfg ['datasets' ]['FP_labels' ] if 'FP_labels' in cfg ['datasets' ].keys () else None
298298
299- # Choose to add emtpy and FP tiles and get related info if necessary
299+ # Choose to add FP and empty tiles and get related info if necessary
300300 EMPTY_TILES = cfg ['empty_tiles' ] if 'empty_tiles' in cfg .keys () else False
301301 if EMPTY_TILES :
302302 NB_TILES_FRAC = cfg ['empty_tiles' ]['tiles_frac' ] if 'tiles_frac' in cfg ['empty_tiles' ].keys () else 0.5
@@ -471,8 +471,6 @@ def main(cfg_file_path):
471471 aoi_tiles_intersecting_oth_labels .head (DEBUG_MODE_LIMIT * 3 // 4 ),
472472 aoi_tiles_gdf
473473 ])
474- else :
475- pass # the following two lines of code would apply in this case
476474
477475 aoi_tiles_gdf .drop_duplicates (inplace = True )
478476 aoi_tiles_gdf = aoi_tiles_gdf .head (DEBUG_MODE_LIMIT ).copy ()
@@ -552,7 +550,6 @@ def main(cfg_file_path):
552550 tiles_gdf = aoi_tiles_gdf .to_crs (IM_SOURCE_SRS ), # <- note the reprojection
553551 base_path = IM_SOURCE_LOCATION ,
554552 end_path = ALL_IMG_PATH ,
555- year = YEAR ,
556553 save_metadata = SAVE_METADATA ,
557554 overwrite = OVERWRITE
558555 )
You can’t perform that action at this time.
0 commit comments