Question

How to plot a graph for false positives per window vs miss rate (or probability of false alarm) and ROC (receiver operating curve) for an object detection application using video?How to determine the number of false positives and hits?An example will be very useful.

Was it helpful?

Solution

Its pretty simple. Store all your true positive (H0) values in one array and all your true negatives (H1) values in another.

Sort both lists.

Find the highest value from both lists and the lowest value from both lists. Divide the range by an appropriate number (e.g 1000), this will be your step.

Now step from minimum to maximum by the step value.

For each evaluation value find the point in the h0 and h1 array that is greater than that value. Divide this index by the number of values in the h0/h1 array and multiply by 100 (giving you a percentage).

  • False rejection (fr) = h0 index percentage.
  • False acceptance (fa) = 100 - (h1 index percentage).

Plot fa against, 100 - fr.

To calculate the EER you need to find the minimum distance between the fr and fa calculated above.

float diff = fabsf( fr - fa );
if ( diff < minDiff )
{
    minDiff = diff;
    minFr   = fr;
    minFa   = fa;
}

And then at the end the EER is calculated as follows:

float eer = (minFr + minFa) / 2.0f;

Edit: The values you get for H0 and H1 are simply score values indicating the "likelihood" that your match is correct. You must calculate these numbers somewhere as you must make a decision on whether you recognise your object or not based on this score.

The H0 list is the scores you get when you have definite matches. The H1 list is the scores you get when you have definite non-matches.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top