Skip to content

The rect of the STrack should be updated in the predict function #22

@teststation5

Description

@teststation5

I believe without the updateRect noted below in the Strack predict function, the Kalman filter is basically ignored for matching the object rect from frame to frame. It still works to a point if the objects don't move much (basically predicting the object stays in the same spot), but it falls apart with objects moving a moderate amount from frame to frame.

void byte_track::STrack::predict()
{
if (state_ != STrackState::Tracked)
{
mean_[7] = 0;
}
kalman_filter_.predict(mean_, covariance_);

//need to add this missing call here
updateRect(); 

}

In the code this project was derived from [ByteTrack-CPP-ncnn], the strack predict function was fixed with commit FoundationVision/ByteTrack@b500c6f
that added:

stracks[i]->static_tlwh();
stracks[i]->static_tlbr();

after the kalman_filter.predict call

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions