| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-07-20 | 3.0 kB | |
| SAHI 0.12.2 - Postprocessing Memory _ Speed Fix source code.tar.gz | 2026-07-20 | 43.4 MB | |
| SAHI 0.12.2 - Postprocessing Memory _ Speed Fix source code.zip | 2026-07-20 | 43.6 MB | |
| Totals: 3 Items | 87.0 MB | 0 | |
A patch release fixing out-of-memory failures and severe slowdowns when
postprocessing large prediction sets, plus model, packaging and documentation
fixes gathered since 0.12.1.
🐛 Fixes
-
Postprocessing no longer allocates an
N x Nmatrix for large inputs (#1395). v0.11 used a shapely STRtree and only compared nearby boxes; v0.12 replaced it with a dense matrix that isO(N^2)in time and memory regardless of layout. The TorchVision backend had no size guard and built sevenN x Ntensors on the GPU, so it ran out of memory first. The greedy loops only ever usematrix >= match_threshold, never the metric values, so the thresholded adjacency is now built directly from the pairs an STRtree reports as intersecting and stored as CSR. Fixes #1374. -
RF-DETR local models can be loaded by class name, with corrected Roboflow docs (#1394).
- MMDetection
has_masknow handlesRepeatDataset(#1387). - Dependency and minimum-version checks are enforced in
import_utils(#1377). - All OpenCV distributions are kept on one version, avoiding conflicting installs (#1393).
📚 Documentation
- Chinese translations updated and completed (#1371).
- Docs default to YOLO26 and link the Ultralytics YOLO26 page (#1386), and YOLO26 is listed among the CLI models (#1378).
🧹 Maintenance & CI
- Bumped
astral-sh/setup-uv8.2.0 → 8.3.2 (#1389) and updatedactions/checkout/actions/cache(#1385). - Relaxed the
buildrequirement to>=0.10,<1.6(#1382).
⚡ Performance
33337 boxes, IOS metric, threshold 0.3. Same outputs before and after
(6571 predictions for greedy_nmm, 4639 for nmm).
CPU (Intel Core i7-13850HX):
| backend | greedy_nmm before | after | nmm before | after |
|---|---|---|---|---|
| numpy | 15.88s | 0.18s | 27.06s | 0.21s |
| torchvision | 6.22s | 0.18s | 17.34s | 0.21s |
| numba | 1.53s | 1.55s | 18.56s | 0.22s |
CUDA (RTX 4000 Ada Laptop, 12 GB):
| backend | greedy_nmm before | after | nmm before | after |
|---|---|---|---|---|
| numpy | 15.93s | 0.26s | 27.00s | 0.21s |
| torchvision | OOM, 4.14 GiB | 0.17s | OOM, 4.14 GiB | 0.23s |
| numba | 1.09s | 1.09s | 18.82s | 0.22s |
Inputs below 2000 boxes, and any non-positive threshold, stay on the dense path where it is faster.
Full Changelog: https://github.com/obss/sahi/compare/0.12.1...0.12.2