strack
STrack
STrack (tlwh, score)
A Simple Track object
Details | |
---|---|
tlwh | List or array-like containing four values (top-left x, top-left y, width, height). |
score | The confidence score of the detection. |
STrack.__init__
STrack.__init__ (tlwh, score)
Initialize an STrack (Simple Track) object.
Details | |
---|---|
tlwh | List or array-like containing four values (top-left x, top-left y, width, height). |
score | The confidence score of the detection. |
STrack.predict
STrack.predict ()
Predict the next state using Kalman filter.
STrack.multi_predict
STrack.multi_predict (stracks)
Predict the state for multiple tracks simultaneously using the shared Kalman filter.
Details | |
---|---|
stracks | List of STrack objects. |
STrack.activate
STrack.activate (kalman_filter, frame_id)
Activate the track.
Details | |
---|---|
kalman_filter | KalmanFilter instance. |
frame_id | ID of the current frame. |
STrack.re_activate
STrack.re_activate (new_track, frame_id, new_id=False)
Reactivate a track with new details.
Type | Default | Details | |
---|---|---|---|
new_track | The new STrack object with updated details. | ||
frame_id | ID of the current frame. | ||
new_id | bool | False | Flag to determine if a new ID should be assigned. |
STrack.update
STrack.update (new_track, frame_id)
Update the track with new details.
:param new_track: The new STrack object with updated details. :param frame_id: ID of the current frame.
STrack._update_track
STrack._update_track (new_track, frame_id, new_id=False)
Internal method to update track details.
Type | Default | Details | |
---|---|---|---|
new_track | The new STrack object with updated details. | ||
frame_id | ID of the current frame. | ||
new_id | bool | False | Flag to determine if a new ID should be assigned. |
STrack.tlwh_to_xyah
STrack.tlwh_to_xyah (tlwh)
Convert bounding box from (top-left x, top-left y, width, height) to (center x, center y, aspect ratio, height).
Details | |
---|---|
tlwh | Bounding box in tlwh format. |
STrack.tlwh_to_tlbr
STrack.tlwh_to_tlbr (tlwh)
Convert bounding box from (top-left x, top-left y, width, height) to (top-left x, top-left y, bottom-right x, bottom-right y).
Details | |
---|---|
tlwh | Bounding box in tlwh format. |
STrack.tlwh
STrack.tlwh ()
Get bounding box in (top-left x, top-left y, width, height) format.
STrack.tlbr
STrack.tlbr ()
Get bounding box in (top-left x, top-left y, bottom-right x, bottom-right y) format.