Unet metrics

Hi. In the Unet algorithm, what is the decision criterion or threshold for true positive?

In Unet, it computes confusion matrix against groundtruth and predicted value.
Then, get the TP from the diagonal of confusion matrix.

which IoU does it consider to calculate the TP/FP and then calculate the confusion matrix?

TP comes from the diagonal of confusion matrix.
FP and FN are also calculated based on confusion matrix and TP.
Then, iou=tp/(fp+tp+fn)