Computational and Mathematical Methods in Medicine / 2013 / Article / Alg 2

Research Article

Constructing Benchmark Databases and Protocols for Medical Image Analysis: Diabetic Retinopathy

Algorithm 2

Pixel-wise evaluation based on pixel scores.
(1)Form a list of tested pixel scores
(2)for each tested pixel score (curr_pix_score) do
(3) TN , TP , FN , FP
(4)for each test image do
(5)  for each test image pixel score do
(6)   if curr_pix_score pixel score then
(7)    if ground truth pixel assignment “normal” then
(8)     TN = TN + 1
(9)    else
(10)     FN = FN + 1
(11)    end if
(12)   else
(13)    if ground truth pixel assignment “abnormal” then
(14)     TP = TP + 1
(15)    else
(16)     FP = FP + 1
(17)    end if
(18)   end if
(19)  end for
(20)end for
(21) (Sensitivity)
(22) (Specificity)
(23)  Add new ROC point ( ) = (1 − SP, SN)
(24)end for
(25)Return the final ROC curve (all points)