File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
napari_cellseg3d/code_models Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -484,7 +484,9 @@ def get_loader_func(num_samples):
484484 patience = self .config .scheduler_patience ,
485485 verbose = VERBOSE_SCHEDULER ,
486486 )
487- dice_metric = DiceMetric (include_background = True , reduction = "mean" )
487+ dice_metric = DiceMetric (
488+ include_background = True , reduction = "mean" , ignore_empty = False
489+ )
488490
489491 best_metric = - 1
490492 best_metric_epoch = - 1
@@ -650,6 +652,13 @@ def get_loader_func(num_samples):
650652
651653 # logger.debug(len(val_outputs))
652654 # logger.debug(len(val_labels))
655+ dice_test = [
656+ utils .dice_coeff (i , j )
657+ for i , j in zip (val_outputs , val_labels )
658+ ]
659+ logger .debug (
660+ f"TEST VALIDATION Dice score : { dice_test } "
661+ )
653662
654663 dice_metric (y_pred = val_outputs , y = val_labels )
655664
You can’t perform that action at this time.
0 commit comments