[Bug]: Unnecessary frame_rate-parameter in Byte Track
bug
### Search before asking
- [x] I have searched the issues and discussions and found no similar bug report.
### Bug
Rather surprising behavior instead of a bug, but the init-parameters of ByteTrack could be optimized:
https://github.com/roboflow/supervision/blob/48035c14e2de8fc6f5f3d7a1bc633f50217eda09/src/supervision/tracker/byte_tracker/core.py#L16
We pass frame_rate (default 30) and lost_track_buffer (default 30) to compute the max_time_lost:
`self.max_time_lost = int(frame_rate / 30.0 * lost_track_buffer)`
To adapt the value, we can change both values (which are only used in this line!), but need to know that there is a hardcoded 30 in the computation.
Also the doc for lost_track_buffer is
> lost_track_buffer (int): Number of frames to buffer when a track is lost.
Which is inconsistent with the implementation.
Proposal:
just remove the frame_rate-parameter and set
`self.max_time_lost = lost_track_buffer`
just like
`self.minimum_consecutive_frames = minimum_consecutive_frames`
### Environment
- Supervision: develop
- Python: ALL
- OS: ALL
### Minimal Reproducible Example
_No response_
### Are you willing to submit a PR?
- [x] Yes I'd like to help by submitting a PR!
关闭于 2026-04-16 1 条评论