5,337
edits
Line 306: | Line 306: | ||
Create a final set <math>D</math>. | Create a final set <math>D</math>. | ||
* While B is not empty | * While B is not empty | ||
** Remove the highest confidence box <math>b_i</math> from <math>B</math>. Add it to <math>D</math> | ** Remove the highest confidence/score box <math>b_i</math> from <math>B</math>. Add it to <math>D</math> | ||
** For every other box <math>b_j</math>, | ** For every other box <math>b_j</math>, | ||
*** If <math>IOU(b_i, b_j) > \lambda</math> (i.e. they bound the same object), discard <math>b_j</math> | *** If <math>IOU(b_i, b_j) > \lambda</math> (i.e. they bound the same object), discard <math>b_j</math> | ||
===Precision and Recall=== | |||
Precision is (# correct) / (# predictions). | |||
Recall is (# correct) / (# ground truth). | |||
Consider the following table | |||
{| class="wikitable" | |||
|Box | |||
|Score | |||
|IOU G1 | |||
|IOU G2 | |||
|IOU G3 | |||
|IOU G4 | |||
|IOU G5 | |||
|- | |||
|b1 | |||
|0.9 | |||
|0.6 | |||
|0.1 | |||
|0.1 | |||
|0 | |||
|0 | |||
|- | |||
|b1 | |||
|0.8 | |||
|0 | |||
|0 | |||
|0.1 | |||
|0 | |||
|0 | |||
|- | |||
|b1 | |||
|0.7 | |||
|0 | |||
|0 | |||
|0 | |||
|0 | |||
|0.7 | |||
|- | |||
|b1 | |||
|0.6 | |||
|0 | |||
|0 | |||
|0 | |||
|0 | |||
|0 | |||
|} | |||
Starting with b1 we have a precision of 1 and a recall of 1/5 since we detect only G1. | |||
From b2, precision becomes 1/2, recall remains the same since we detect nothing. | |||
From b3, precision becomes 2/3, recall becomes 2/5. | |||
From b4, precision becomes 2/4, recall is still 2/5. | |||
;Hard mining | ;Hard mining |