| Name | Modified | Size | Downloads / 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 evaluatecan run on ultrafast-pycocotools (https://github.com/obss/sahi/pull/1452). Install it withpip install "sahi[ultrafast]"and pass--backend ultrafaston the CLI orbackend="ultrafast"tosahi.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_thrsas 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_intervalwhile a visual was shown, and the exported video usedfps / frame_skip_intervalinstead offps / (frame_skip_interval + 1), so it played back faster than the source. remove_invalid_coco_resultsskips bboxes that do not have four values (https://github.com/obss/sahi/pull/1455) instead of raisingIndexError.get_coco_segmentation_from_obb_pointsreturns an empty list for empty input (https://github.com/obss/sahi/pull/1456) instead of raisingIndexError.
⚡ 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.5they 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_predictionused to decode the file four times. It now reuses the decode that slicing already holds. slice_imageuses 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, andread_image_sizereads 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
- The torch floor is 2.13.0 on Python 3.10 and newer (https://github.com/obss/sahi/pull/1440), 2.8.0 on Python 3.9 and 2.4.1 on Python 3.8, the newest release each of them still has wheels for.
- Development installs pick the torch build that matches the machine (https://github.com/obss/sahi/pull/1446), CUDA or CPU, instead of always CPU.
- CI tests Python 3.13 and 3.14 (https://github.com/obss/sahi/pull/1433).
📚 Documentation
- Documented commands, defaults and examples match the code (https://github.com/obss/sahi/pull/1427, https://github.com/obss/sahi/pull/1452). This includes the
coco evaluateoptions, which now list--type segm,--max_detectionsand--backend. - The quick start ends in a prediction, pages link to the next page, and API parameters are shown as tables (https://github.com/obss/sahi/pull/1428, https://github.com/obss/sahi/pull/1429).
- The docs point at the site they are published on and serve their markdown (https://github.com/obss/sahi/pull/1431), and demo links resolve outside GitHub (https://github.com/obss/sahi/pull/1435).
- A new notebook measures batched sliced inference speed (https://github.com/obss/sahi/pull/1447) on the machine it runs on and checks that batching does not change the detections.
- The README install example uses torch 2.13.0 on CUDA 13.0.
- General cleanups (https://github.com/obss/sahi/pull/1430, https://github.com/obss/sahi/pull/1436, https://github.com/obss/sahi/pull/1441, https://github.com/obss/sahi/pull/1442, https://github.com/obss/sahi/pull/1444): notebook outputs are stripped, autoref warnings and dead links are fixed, and punctuation is consistent.
Full Changelog: https://github.com/obss/sahi/compare/0.12.6...0.12.7