Download Latest Version 0.12.8 source code.zip (14.2 MB) Google Add to Preferred Sources
Home / 0.12.7
Name Modified Size InfoDownloads / Week
Parent folder
0.12.7 source code.tar.gz 2026-09-25 14.0 MB
0.12.7 source code.zip 2026-09-25 14.2 MB
README.md 2026-09-25 4.5 kB
Totals: 3 Items   28.2 MB 0

A patch release that adds an optional ultrafast-pycocotools backend to COCO evaluation, fixes four crashes and miscounts in COCO and video utilities, speeds up postprocessing and sliced prediction, and raises the torch floor to 2.13.0 on Python 3.10 and newer.

✨ Features

  • sahi coco evaluate can run on ultrafast-pycocotools (https://github.com/obss/sahi/pull/1452). Install it with pip install "sahi[ultrafast]" and pass --backend ultrafast on the CLI or backend="ultrafast" to sahi.scripts.coco_evaluation.evaluate. pycocotools stays the default, and the tests check that both backends return the same bbox and segm results (https://github.com/obss/sahi/pull/1457).

🐛 Fixes

  • COCO evaluation accepts a list of IoU thresholds (https://github.com/obss/sahi/pull/1452). Passing iou_thrs as a list stopped in the summary step with a NumPy "nonzero on 0d arrays" error. Thresholds are now always stored as an array.
  • Video prediction counts skipped frames correctly (https://github.com/obss/sahi/pull/1449). The progress bar total only accounted for frame_skip_interval while a visual was shown, and the exported video used fps / frame_skip_interval instead of fps / (frame_skip_interval + 1), so it played back faster than the source.
  • remove_invalid_coco_results skips bboxes that do not have four values (https://github.com/obss/sahi/pull/1455) instead of raising IndexError.
  • get_coco_segmentation_from_obb_points returns an empty list for empty input (https://github.com/obss/sahi/pull/1456) instead of raising IndexError.

⚡ Performance

  • NMS and greedy NMM choose the stored-pair path again when boxes are spread out (https://github.com/obss/sahi/pull/1443). Since 0.12.5 they always read rows from the STRtree on demand, which is slower than a stored pair list when boxes are spread out. They now pick the path by crowding the same way NMM does, and the output is unchanged.
  • Streaming postprocessing drops boxes it has finished with (https://github.com/obss/sahi/pull/1426). Settled boxes are removed from later STRtree queries, so crowded inputs query a tree that shrinks as the loop runs.
  • Sliced prediction decodes the source image once (https://github.com/obss/sahi/pull/1445). get_sliced_prediction used to decode the file four times. It now reuses the decode that slicing already holds.
  • slice_image uses less peak memory (https://github.com/obss/sahi/pull/1421). Local files decode straight to a NumPy array with OpenCV instead of going through Pillow, and read_image_size reads the size from the file header without decoding the image. 16-bit files and anything else OpenCV declines use the Pillow path as before.

📦 Build

📚 Documentation

Full Changelog: https://github.com/obss/sahi/compare/0.12.6...0.12.7

Source: README.md, updated 2026-09-25