Nullkooland / Falling-Object-Detection

Falling object detection based on CV algorithms
7 stars 7 forks source link

about tracklets filtering #1

Open zt1112 opened 3 years ago

zt1112 commented 3 years ago

Hello, I am very interested in your work. I want know that did you do some filtering operations after tracking? (For example, the noise tracklet caused by the shaking of the tree.)

Nullkooland commented 3 years ago

There're two stages in selecting a valid trajectory.

First, a tracked bbox is picked only if it is matched with new observations (hit) in consecutive frames (hitStreak > minHitStreak). (This is the method used in SORT algorithm)

Second, the picked bbox can be used to

  1. Create a new trajectory, if the bbox belongs to no history trajectories.
  2. Append to a history trajectory.

If a trajectory hasn't been updated by any picked tracked bbox for a while, it will expire and I used these metrics to determine whether it is a valid falling object trajectory:

  1. It should have enough samples (bboxes.count() > minNumOfBBoxes),
  2. It should have reasonable vertical span (bboxes.last().Y - bboxes.first().Y > minVerticalSpan)

An expired trajectory can be output only if it satisfies both metrics.