INNER CODE UNIT · Python

Fscore

andrewssobral/bgslibrary · tools/fet/fet.py:34

Fscore = .0 # 2*(Precision*Recall)/(Precision+Recall)

# TP - # of foreground pixels classified as foreground pixels.
# FP - # of background pixels classified as foreground pixels.
# TN - # of background pixels classified as background pixels.
# FN - # of foreground pixels classified as background pixels.

green = [0,255,0] # for FN
blue  = [255,0,0] 
red   = [0,0,255] # for FP
white = [255,255,255] # for TP
black = [0,0,0] # for TN

print('Processing')
k = 1
for file_gt, file_fg in zip(files_gt, files_fg):
  print(k, file_gt, file_fg)
  img_gt = cv2.imread(path_gt + file_gt,cv2.IMREAD_GRAYSCALE)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…