iMED-Lab / OCTA-Net-OCTA-Vessel-Segmentation-Network

Apache License 2.0
114 stars 20 forks source link

about metric #8

Open fengweie opened 3 years ago

fengweie commented 3 years ago

Hi, first of all, thank you for your excellent work. But I have a few questions, first of all, about the performance evaluation, in the evaluation.py file, why do you have to do (dilated_gt_arr = cv2.dilate(gt_arr, kernel, iterations=1) first?


def numeric_score(pred_arr, gt_arr, kernel_size=(1, 1)):  # DCC & ROSE-2: kernel_size=(3, 3)
    """Computation of statistical numerical scores:

    * FP = False Positives
    * FN = False Negatives
    * TP = True Positives
    * TN = True Negatives

    return: tuple (FP, FN, TP, TN)
    """
    kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, kernel_size)
    dilated_gt_arr = cv2.dilate(gt_arr, kernel, iterations=1)

    FP = np.float(np.sum(np.logical_and(pred_arr == 1, dilated_gt_arr == 0)))
    FN = np.float(np.sum(np.logical_and(pred_arr == 0, gt_arr == 1)))
    TP = np.float(np.sum(np.logical_and(pred_arr == 1, dilated_gt_arr == 1)))
    TN = np.float(np.sum(np.logical_and(pred_arr == 0, gt_arr == 0)))

    return FP, FN, TP, TN

The second question is why do you do the ostu thresholding after getting the prediction? Does it make a difference if I set a threshold of 0.5?

‘’‘
    thresh_value, thresh_pred_img = cv2.threshold(pred_img, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
    print("shape of prediction", thresh_pred_img.shape)
    print("shape of groundtruth", gt_img.shape)
’‘’
YuhuiMa commented 3 years ago
  1. In Section V.B, we mention that for centerline-level vessel detection in the DVC images from the ROSE-1 and all images from the ROSE-2, a three-pixel tolerance region around the manually traced centerlines is considered a true positive. To this end, we applied dilation to the centerline annotations and then calculated these metrics.
  2. The otsu algorithm could estimate a suitable threshold according to intensity distribution for better binarization than a fix threshold of 0.5.