Facial recognition

ResourceSpace incorporates facial recognition capability via integration with OpenCV, an open source computer vision and machine learning software library. The ResourceSpace annotate feature has also been used in order to create the association between a fixed list field and a face.

To tag someone, simply do the following:

  • Go to view the resource
  • Hover over the bottom of the preview of the image and click on the annotation tool icon
  • Click and drag an area to select a face. Once you release the mouse, if the system has been trained it will suggest the name of the person in the image
  • The system can suggest two things, either "unknown person" or, if the face is recognised, a name from a fixed list field
  • Clicking on the suggested name will apply the tag
  • Click Save

Note: in the same way as applying any other annotation, you MUST save at the end in order for it to take effect.

Once you've tagged someone the system will not automatically recognise them unless it has been (re)trained with that face. A system/ server administrator should create a cronjob/ scheduled task to run pages/tools/facial_recognition_trainer.php

Reliability

  • ResourceSpace is using the LBPH (Local Binary Patterns Histograms) algorithm for facial recognition.
  • Reliable predictions will usually begin to appear after the system has been trained with at least 10 images of the same face.
  • To increase the reliablity of this feature, the system should be trained using images featuring various environments and appearances e.g. indoors / outdoors, with / without glasses, long / short hair

Due to a known (open) issue with OpenCV, from version 10.4 users can use a metadata field to choose a resources' annotations to be used to train the face recogniser. This allows limiting the number of annotations with (hopefully) higher quality tags. By having a limited number of annotations for training, the final model size will be smaller which allows OpenCV to read it and use for predicting new labels.

Using annotations and facial recognition together

ResourceSpace has the ability to allow tagging of an image for both facial recognition and as part of the annotation feature (the core feature on top of which facial recognition sits).

When using annotations in this mode the user will be first presented with a dropdown list to select the field in which they wish to tag. Once a field is selected, the rest of functionality should already be familiar - start typing and soon suggestions will be presented for the user to select the ones most relevant to the image.