Skip to content

Body tracking algorithm#

Body tracking algorithm differs from the face one. It does not use the tracker feature, only detect or redetect are used. It also used the intersection over union (IOU) metrics for matching tracks with new detections. The human:iou-connection-threshold parameter is used as a threshold. For better tracking accuracy the ReIdentification feature is used to merge different tracks of one human. For more information, see ReIdentification.

For the face tracking algorithm, when detect or redetect fails, the track is updated with a tracker. But for body tracking in that case or under some other conditions, it moves to the group of inactive tracks. Tracks from this group are invisible for all observers, and they do not participate in common tracking processing except of ReId.

Note, that the skip-frames parameter does not affect the body tracking algorithm. Body tracks are finished according to their own logic. Now, there is only one case, when trackEnd is called for a body track (see the TrackEndCallbackData reason field). An inactive track is finished by a timeout specified in the human:inactive-tracks-lifetime config parameter. A value of inactive-tracks-lifetime should be greater than reid-matching-detections-count.

Consider the below algorithm notes and parameters relation.

After detect/redetect, all found detections are filtered by some conditions:

  • Overlapped detections may be removed. For overlapping estimation, the IOU metric is used. If the IOU is higher than the other:kill-intersection-value threshold parameter, then no one, both or detection with lower detection score, is removed from further processing, depending on parameter remove-overlapped-strategy.
  • Detections, considered to be horizontal, are removed. remove-horizontal-ratio sets detection width to height ratio threshold. It is used for removing horizontal detections.