Reset tracking state
gabrielcirac opened this issue · comments
Hello emilianavt !!
Thank you very much for keeping up this great job! I have some doubts.
1 - Are facial marks obtained through an average during the video? LmX = (Lm1 + Lm2 + Lm3 ... LmN) / 2?
2 - When a transition between faces occurs, does the new detection have residual values of the old face?
3 - It is possible to reset the tracking status whenever a new person appears.
I would like to obtain landmarks as current as possible and without any trace of the old face.
Thank you very much.
Hi!
-
I'm not exactly sure what you mean. If you mean the features like
mouth_open
, they are calculated in a slightly more complex way. You can check theFeatureExtractor
'supdate
function here to see the exact calculation. -
As you can see here the
FaceInfo
's update function is called withNone
when a face isn't updated, which resets all face specific information, except for the face's 3D model adaption, which is disabled by default and seems to do more harm than good anyway. As long as the 3D model adaption is disabled (default), the 3D landmarks only depend on previous frames for the initialization values to the PnP solver. The 2D landmarks do not depend on previous frames at all, other than the previous frame's landmark's bounding box being used to look for the face in the new frame. If you want to avoid this, please refer to #3. -
Most data is reset, as mentioned in 2). By default the bounding box of the face is kept around for a few frames and tried again to see if the face reappears, but this can be adjusted using the
--discard-after
and--scan-every
arguments.
If you have more questions, let me know.
Thank you very much for your answer, it clarifies perfectly.