Face Location in a frame


Hi Everyone,

I am pretty new to Affectiva. I have been using it for my research projects. So my question is related to multiple faces detection. Let’s say we have two people in our frame and affectiva is trying to give two different face id’s for each person. the problem arises when one person leaves the frame and comes back or at some point in the video, his face is not being detected. This resets the ace id’s. For example, it might first start giving the result as face id 0 and 1, then for many of the reasons that are explained in other topics, it is not able to detect one of the faces. When it is again able to detect it, it gives face id 2 to the previous face id 1. and this problem continues until the end of the process. Finally, you might be having 10 different face id’s for a video that only includes one or two people. Is there any solution for this issue? For instance, can we get the location of each face in the frame? Let’s say if the two people are sitting on two side of the frame and we recognize them based on their location?!


Hi. First, your description of the behavior is generally correct, although if a face is temporarily not detected but within a few seconds it reappears in approximately the same location as when it was “lost”, then the previously assigned Face ID will continue to be attached to the rediscovered face. However, if the face reappears in a different location or after more than a few seconds, it will be assumed to be a different person and will be assigned a new ID.

In response to your later question, yes, you can use the location of a given face in the frame to apply your own logic about whether a newly-found face should be considered the same person as a previously found face. You can use the featurePoints member of the Face class to determine the location of a face.