supervision/docs
abritton2002 51dd062407
fix: VideoInfo.fps returns float instead of truncated int (#2210)
* VideoInfo.fps returns float instead of int

Truncating the raw CAP_PROP_FPS value with int() causes timing drift for
non-integer frame rates (23.976, 29.97, 59.94). Over a long video this
accumulates into noticeable sync errors — e.g. 23 vs 23.976 drifts ~1s
per minute of footage.

Changes:
- VideoInfo.fps type annotation: int -> float
- from_video_path: int(video.get(CAP_PROP_FPS)) -> float(...)
- ByteTrack.frame_rate type annotation: int -> float (already converts
  to int internally via max_time_lost = int(frame_rate / 30.0 * buffer))
- Tests: assert fps is float, add float_fps_video_path fixture at 23.976

* fix: update examples to cast float fps to int where required
* fix: wrap long docstring line in FPSBasedTimer (ruff E501)
* test: remove unused float_fps_video_path fixture

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-13 20:05:19 +02:00
..
assets add lenny 2023-12-04 17:03:05 +00:00
classification docs(fix): 🐞📝 removal of table of content duplicates core(Detections,Classification) 2024-01-31 15:09:07 +03:00
datasets docs: Wrap all placeholder paths in quotes and code expressions (#2128) 2026-02-03 14:00:40 +01:00
detection docs: Fix outdated doc files (#1995) 2026-02-03 16:52:55 +01:00
how_to Fix Albumentations docs typo 2026-02-10 21:48:50 +09:00
javascripts docs: fix copy doctests without `>>>` and `...` by button & ctr+c (#2138) 2026-02-04 23:09:16 +09:00
keypoint docs: Wrap all placeholder paths in quotes and code expressions (#2128) 2026-02-03 14:00:40 +01:00
metrics update `new` docs page marks 2025-11-14 14:52:39 +01:00
notebooks Human behavior with YOLO-World Cookbook (#915) 2026-02-03 14:59:08 +01:00
stylesheets after few tests drop support for `pycon` in docs examples 2025-08-07 07:41:52 +02:00
theme docs: fix copy doctests without `>>>` and `...` by button & ctr+c (#2138) 2026-02-04 23:09:16 +09:00
utils reimplement `crop_image` to skip type casting when Pillow Image given 2025-11-14 17:55:07 +01:00
CNAME Create CNAME 2023-08-22 13:08:10 +01:00
assets.md Add ImageAssets for download (#932) 2026-02-12 19:22:15 +09:00
changelog.md fix: VideoInfo.fps returns float instead of truncated int (#2210) 2026-04-13 20:05:19 +02:00
code_of_conduct.md move CODE_OF_CONDUCT.md and CONTRIBUTING.md for improved accessibility (#2036) 2026-02-03 03:58:28 +01:00
contributing.md move CODE_OF_CONDUCT.md and CONTRIBUTING.md for improved accessibility (#2036) 2026-02-03 03:58:28 +01:00
cookbooks.md Update "New" tags in docs, fix typo in one heading 2024-06-05 17:44:25 +02:00
deprecated.md docs: Fix outdated doc files (#1995) 2026-02-03 16:52:55 +01:00
index.md docs: Wrap all placeholder paths in quotes and code expressions (#2128) 2026-02-03 14:00:40 +01:00
license.md docs: contributing.md/code_of_conduct/license added into docs 2024-01-31 22:10:28 +03:00
trackers.md make sure only recently updated pages have new status 2025-07-15 20:10:35 +02:00