Assignment 4

CS 585 HW 4
Shubhangi Jain
Teammate: Rajat Tripathi

Problem Definition

The goal of this assignment is to learn more about the practical issues that arise when designing a tracking system. More specifically, we are going to track animals in video sequences, i.e., identifying the same animal from frame to frame.

To achive this goal, we first need a model to predict the position of an object on next frame based on its positions on previous frames. We could use filters such as alpha-beta filter, kalman filter to do the trick. For each predicted position, we need to associate it with a real detected object in the next frame using some data association algorithm.

Difficulties include bad object detections, objects occluding with each other, etc.

Method and Implementation

  1. First found the centroids of each detected objects in each and every frames.
  2. In pre processing we are doing background substraction, morphology(erosion and dilation)
  3. Created a tracking object class to store all the data related to the objects under tracking, including its position, filter parameters and trace.
  4. For the first frame, created an instance of the tracking object class for each detected objects. Add them to the tracking object list.
  5. Initiated the Kalman filter to predict the position of each tracking objects in the next frame.
  6. Data-Association: Used hungarian method to do bipartite matching and associated the detected object to it's appropriate track.
  7. Objective of Hungarian method is to minimize the total cost rather than element wise cost, by doing bipartite matching.
  8. Updated the filter parameters as well as the tracking objects list. This includes adding new detected objects into the tracking object list if no exsiting tracking object is associated with it, and removing objects from the list if we lose track of them.
  9. Repeat such steps all the way through the last frame.

Detection Tracking Kalman Filter


For the "bat" and "cell" dataset, we have used our own detection pipeline. To pre processe the data we applied background substraction,morphology(erosion and dilation). To calculate the centroids of the bats and cells we are using moments. In subsequent frame we are tracking the centroids calculated in previous frames.

With these centroids as INPUT, the algorithm can track the objects and draw the tracking results dynamicly in real-time.


The tracking results for both dataset are shown below.



The implemented kalman filter predicts the position of the objects fairly well.As a whole, this track can work well provided that the detections are accurate and occlusion is limited.

Credits and Bibliography

Reference 1
Reference 2
Reference 3