how to see prediction and correction values in trackerGNN function?

6 vues (au cours des 30 derniers jours)
alex
alex le 7 Août 2023
Commenté : alex le 23 Oct 2023
Hello. In the example '' implement simple online and real-time tracking" in MATLAB, I want to see the values of prediction and correction (when trackerGNN is used and initialization is done with constant velocity Kalman filter). I mean in the following piece of code how can I access the prediction value and correction value of the tracker when the Kalman filter is used for initialization and prediction of the next location of tracks? Can anyone help with this issue?
tracker = trackerGNN(FilterInitializationFcn=@helperInitcvbbkf,...
HasCostMatrixInput=true,...
AssignmentThreshold= -IoUmin);
tracks = tracker(highScoreDetections, reader.CurrentTime, iouCost);

Réponse acceptée

Gael Goron
Gael Goron le 20 Oct 2023
Hi Alex,
This might come a bit late, but hopefully it will still be useful to some.
There are plenty of ways to analyze the behavior of the tracker at each step. My first recommendation would be to modify this line of code to output the analysis information structure:
[tracks, ~, alltracks, info] = tracker(highScoreDetections, reader.CurrentTime, iouCost);
This fourth output contains a lot of useful information regarding the decisions that the tracker made during this step. See this page for details on the list.
In particular it will list which tracks were just initialized by their trackID. You can find those new tracks in the 3rd output 'alltracks' and query their State property to find their initial value (which by construction is simply the bounding box measurement of the initializing detection, and null velocities). The 'Assignment' field informs you which detection was used to correct each track. Note that the correction value is already available to you by querying the State property of the track output.
The predicted location of the track is calculated internally by the tracker. You have a few ways to access this information.
  • prior to running the above line of code, query the predicted locations of all existing tracks in tracker using predictTracksToTime:
allpredictedTracks = predictTracksToTime(tracker, 'all', reader.CurrentTime);
% inspect the State property here
[tracks, ~, alltracks, info] = tracker(highScoreDetections, reader.CurrentTime, iouCost);
  • In this particular example, the previous step is also done as part of the IOU cost calculation, therefore you can also output the predicted track states by modifying that function, or put a breakpoint in the similarityIoU function in the helperSORTCost.m function file.
Hope that helps

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by