Commit 5e707069 by Tiago de Freitas Pereira

### Solved issue #6

parent 3c84d87b
 ... @@ -130,22 +130,11 @@ def recognition_rate(cmc_scores, threshold=None): ... @@ -130,22 +130,11 @@ def recognition_rate(cmc_scores, threshold=None): correct += 1. correct += 1. else: else: #If threshold is NOT None, we have an openset identification #If threshold is NOT None, we have an openset identification if(len(pos)>0): max_pos = numpy.max(pos) # if we have positive scores the comparison is considered correct # if the positive score is higher than the threshold AND all negative scores max_pos = numpy.max(pos) if((threshold < max_pos) and (neg < max_pos).all()): correct += 1. else: #If we don't have a positive score we only will consider #a correct classification if ALL the negative scores are smaller than the threshold if (neg < threshold).all(): correct += 1. if((threshold < max_pos) and (neg < max_pos).all()): correct += 1. # return relative number of correctly matched scores # return relative number of correctly matched scores return correct / float(len(cmc_scores)) return correct / float(len(cmc_scores)) ... ...