Open ssswww4444 opened 4 years ago
Kalman Filter uses bounding box center x, center y, aspect ratio, height. Hence detections are converted to .to_xyah() Track's mean is hence in center x, center y, aspect ratio, height format. Track.to_tlwh() is used to convert the values back to xmin, ymin, width, height
Sorry if i'm wrong....
In function to_xyah() in detection.py It seems like this function will actually return:
ret = [top + width / 2, left + height / 2, a, h]
. (which doesn't make much sense to me)And we get the final results from track.to_tlwh() implemented in track.py As "mean" is in format (x, y, a, h), this function will actually return:
ret = [x - width / 2, y - height / 2, width, height]
=> which means [left, top, width, height].Both functions looks weird to me, but if I use them together: detection -> pass detection.to_xyah() to tracks -> track returns track.to_tlwh() -> this will gives me the correct tlwh box eventually.
But detection.to_xyah() could affect the initial "mean" and the update() function of tracks, would this cause any problem?