0.30.2
anomalyco/opentui0.30.2Sep 4, 2026by Borda
AI Summary
Fixes silent numeric-correctness bugs in detection utilities, including integer box area overflow and coordinate truncation, plus an InferenceSlicer determinism fix under multithreading.
Key Highlights
- `sv.Detections.box_area` no longer overflows to a negative number (computes in float64).
- `xcycwh_to_xyxy` / `denormalize_boxes` stop truncating integer boxes, preserving fractional coordinates.
- `InferenceSlicer` merges results in source order under multithreading, restoring documented ordering guarantees.
Breaking Changes
- Return dtype for integer input changed to float64 for `box_area`, `xcycwh_to_xyxy`, and `denormalize_boxes`, which can cause TypeError when used for array slicing.
Full Release Notes
# 0.30.2: Detection numeric-correctness fixes supervision 0.30.2 fixes three silent numeric-correctness bugs in the detection utilities — integer box areas that could wrap negative on large boxes, and two coordinate converters that truncated fractional values on integer input — plus an `InferenceSlicer` determinism fix that restores its documented source-order result guarantee under multithreading. A set of versioned-docs reliability fixes rounds out the release. No breaking API changes, no new public API. ## ✨ Spotlights / highlights ### `sv.Detections.box_area` no longer overflows to a negative number Integer-coordinate box area now computes in `float64`. A large `int32` box (`50000 x 50000`) previously wrapped to a negative area. ```python detections = sv.Detections(xyxy=np.array([[0, 0, 50000, 50000]], dtype=np.int32)) detections.box_area # array([2.5e+09]) — was negative before the fix ``` ### `xcycwh_to_xyxy` / `denormalize_boxes` stop truncating integer boxes Both converters wrote fractional half-extent or scaled coordinates into a copy of the integer input, silently truncating toward zero — relevant when converting quantized VLM output (e.g. boxes on a `0..1000` grid). ```python xcycwh_to_xyxy(np.array([[10, 10, 5, 5]], dtype=np.int32)) # array([[ 7.5, 7.5, 12.5, 12.5]]) — the fractional coordinate 7.5 is no longer truncated to 7 ``` ### `InferenceSlicer` merges results in source order under multithreading Slice results now merge in source order under `thread_workers > 1`, restoring the ordering guarantee its docstring documents. Row order — and, for tied confidences, which overlapping box survives `with_nms`/`with_nmm` — no longer varies between runs on identical input. ## 🔄 Migration guide No breaking API changes, but three fixes above change return dtype for integer input: - `sv.Detections.box_area` / `.area` — integer `xyxy` now returns `float64` (was the input's integer dtype, which could silently overflow) - `sv.xcycwh_to_xyxy` — integer input now returns `float64` (was truncated integer output) - `sv.denormalize_boxes` — integer input now returns `float64` (was truncated integer output) If your code indexes arrays with these outputs (e.g. `image[y1:y2, x1:x2]`), a float64 result raises `TypeError: slice indices must be integers`. Cast explicitly where integer indices are required: `xcycwh_to_xyxy(boxes).astype(int)`. ## 📝 Notable changes ### 🔧 Fixed - `sv.Detections.box_area` (and `sv.Detections.area` for axis-aligned boxes) now computes integer-coordinate box areas in `float64`, preventing integer overflow for large boxes. (#2514) - `sv.xcycwh_to_xyxy` no longer truncates coordinates for integer input arrays. (#2515) - `sv.denormalize_boxes` no longer truncates coordinates for integer input arrays. (#2516) - `sv.InferenceSlicer` now merges slice results in source order when `thread_workers > 1`, restoring the ordering guarantee its docstring documents. (#2517) - Docs deployment for `latest` no longer fails with `error: version 'latest' already exists` when `latest` exists as an alias of a released version. (#2512, #2513) - Versioned documentation builds now emit a valid `/latest/search/` SearchAction URL when Mike removes the trailing slash from `site_url`; docs CI renders the custom theme under Mike version contexts to protect the URL, version banners, and star JSON-LD. Applies to future builds going forward. (#2529) - Versioned documentation banners now adjust MkDocs Material's desktop sidebar inline layout and scroll height without shifting the mobile navigation drawer. (#2532) - Versioned documentation deploys now export the version being built, so the outdated-version banner reaches readers of the `develop` tree; the workflow also now backs up the pre-rewrite `gh-pages` tip to a timestamped branch before committing over it. Applies to future builds going forward. (#2533) - The canonical-backfill workflow now reports (in the job summary) rewritten canonicals whose target page does not exist under `latest/`, and backfills the outdated-version banner itself into already-published archive trees, patching the empty banner markup those pages already carry rather than rebuilding them. (#2534) ## 🏆 Contributors - **Advait Shukla** (@AdvaitS) — fixed integer overflow in `box_area` - **Guillaume Flambard** (@guillaume-flambard, [LinkedIn](https://www.linkedin.com/in/guillaume-flambard)) — fixed integer truncation in `denormalize_boxes` and `xcycwh_to_xyxy` - **Roshan Sharma** (@roshaninfordham, [LinkedIn](https://www.linkedin.com/in/roshansharmaofficial/)) — fixed `InferenceSlicer` result ordering under multithreading - **Jirka Borovec** (@Borda, [LinkedIn](https://linkedin.com/in/jirka-borovec)) — versioned-docs banner layout, `MIKE_DOCS_VERSION` export, `gh-pages` backup, and canonical-backfill fixes (#2529, #2532, #2533, #2534) ______________________________________________________________________ **Full changelog**: https://github.com/roboflow/supervision/compare/0.30.1...0.30.2