I follow the Multiple Object_Tracking tutorials from StudentDave https://www.youtube.com/watch?v=HQW4wtLBddk&t=43s
The frames extract from the video was produced by TheMinimumPC (the nice guy on Youtube in tutorial 3).
1st) Run the fly_detection_studentdave.m to detect the flies and store the position
2st) Run the multi_fly_tracker_studentdave.m to apply kalman filter for tracking