A. B. - 2016-03-21

Hi,

first of all, thanks for the nice work with OpenIMAJ ☺

I'm currently using a FisherFaceRecogniser to recognize faces in patches previously extracted from a face detector (using Haar cascades). The recognition rates I'm getting are pretty good, however the confidence of the results is always set to 1.0. Digging a bit through the code, I ended up looking at KNNAnnotator.java, where in the annotate function we seem to:

  1. Build a TObjectIntHashMap that maps annotations to their distance
  2. in the loop that loops over the results of searchKNN, set for each annotation the key in the hash to the annotation, and the value to 1 (or increment from 1 if it's already present?)
  3. build a list of ScoredAnnotation using each (key, value) pair from the hash (where the value is then always 1?)

Is that the intended behaviour? Maybe I'm simply understanding the API wrongly?