Say for instance, face detection algorithms - I see researchers testing their algorithms and table their results under TP and FP. What are these?

  • 1
    $\begingroup$ This is more a machine-learning question than DSP. $\endgroup$
    – user7358
    Commented Mar 1, 2014 at 7:26
  • $\begingroup$ Normally, I thought people in this area reported in terms of precision and recall curves (en.wikipedia.org/wiki/Precision_and_recall). $\endgroup$
    – Batman
    Commented Mar 1, 2014 at 13:38
  • $\begingroup$ but how can I detect whether a pixel is true positive or true negative ? Is it by visual inspection only ? Or there is any other method or metrics ? $\endgroup$
    – Somesh Roy
    Commented Dec 30, 2017 at 9:51

2 Answers 2


A ,,true'' positive would be an image that has a property (in the context of face detection maybe: ,,contains a face'') and that is recognized by a program as such. A ,,false'' positive then is one that does not have the property but is recognized anyway.


These terms are validation metrics used for verifying quality of a segmented image. In a scenario where you want to compare a segmented image with ground truth, then taking the ground truth image as base of comparison you can make assumption of taking foreground as "white" pixels and background as "black" pixels in ground-truth. The terms that you referred then would mean:

  1. True positive (TP) : pixels correctly segmented as foreground
  2. False positive (FP) : pixels falsely segmented as foreground
  3. True negative (TN) : pixels correctly detected as background
  4. False negative (FN) : pixels falsely detected as background

These metrics are then used to calculate sensitivity, specificity and accuracy as:

sensitivity : The sensitivity tells us how likely the test is come back positive in someone who has the characteristic. This is calculated as TP/(TP+FN).

specificity : The specificity tells us how likely the test is to come back negative in someone who does not have the characteristic. This is calculated as TN/(TN+FP).

accuracy : (TP+TN)/(TP+FP+TN+FN)

Hope this helps !!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.