Skip to content

Releases: obss/sahi

SAHI 0.12.1 Release - Bug Fix 🐞

08 Jun 00:22
951892d

Choose a tag to compare

What's Changed

Full Changelog: 0.12.0...0.12.1

🚀 SAHI v0.12.0 Batch Inference, Torch-Free Core & New Open-Vocabulary Models

31 May 22:47
2a860bd

Choose a tag to compare

Sliced Aided Hyper Inference detect the small stuff in big images.

This is one of the largest SAHI releases to date: 95 commits since 0.11.34 (rolling in the 0.11.35/0.11.36 hotfixes), spanning a re-architected post-processing engine, true batch inference, a lighter torch-free core, six new model families, and a full documentation overhaul.


🚀 Highlights

⚡ Batch inference, torch-free core & accelerated post-processing backends (#1336)

A ground-up reworking of how SAHI runs and merges predictions:

  • Batch inference slices are now processed in batches end-to-end, dramatically improving throughput on GPU.
  • Torch-free core the core slicing/ post-processing path no longer hard-depends on PyTorch. Install only what your model backend needs.
  • Pluggable post-processing backends NMS / NMM now run on a selectable backend:
    • NumPy zero heavy deps, runs anywhere
    • Numba JIT-accelerated CPU path for large slice counts
    • TorchVision GPU-accelerated when torch is available
    • Backend auto-selects based on what's installed, and can be forced explicitly.

🎚️ Finer control over slicing & post-processing

  • force_postprocess_type in get_sliced_prediction for explicit control over how overlapping detections are merged (#1346).
  • Per-call confidence_threshold override across the prediction APIs tune confidence without rebuilding the model object (#1352).
  • Progress bar + progress callback for get_sliced_prediction, available in both the Python API and CLI (#1255).

🧠 New model support

  • GroundingDINO (HuggingFace) zero-shot, text-prompted open-vocabulary detection. Describe what you're looking for in natural language and run it through SAHI's sliced pipeline perfect for finding small, rare, or unlabeled objects in large images ships with a dedicated demo notebook (#1361).
  • Universal segmentation from HuggingFace run any HF universal/panoptic segmentation model through SAHI's sliced pipeline (#1360).
  • RF-DETR-Seg segmentation variant of RF-DETR (#1315).
  • YOLOE detection model (#1268).
  • YOLO-World open-vocabulary detection model (#1267).
  • YOLO26 support across the Ultralytics backend, CLI, docs, and notebooks (#1321, #1322, #1356).

📚 Documentation overhaul

  • Migrated docs to Zensical with full code typing & formatting cleanup (#1344).
  • Chinese (zh) translation of the documentation added and kept in sync (#1253, #1332, #1347).
  • New API reference, ** post-processing backends guide**, security policy, and Code of Conduct (#1257, #1336, #1272, #1349).

✨ Performance & Improvements

  • Significantly faster post-processing NMS, NMM, and GREEDYNMM now use a shapely STRtree spatial index, dramatically speeding up merging on images with many slices/detections (#1248). Thanks @nikvo1!
  • Faster read_image_as_pil for quicker slicing throughput (#1353).
  • Improved performance & resource management in prediction and slicing (#1263).
  • Better nms performance with correct handling of empty predictions (#1288).
  • Replaced pybboxes with a lightweight in-house yolo_bbox_to_voc_bbox (#1320).
  • Dropped the pybboxes and pinned opencv-python version constraints for cleaner installs (#1325).

🐞 Bug Fixes

  • Fixed empty bounding boxes caused by an empty shapely_annotation.multipolygon (#1140).
  • Fixed invalid segmentation masks for Detectron2 models (#1262).
  • Corrected margin calculation in BoundingBox (#1286).
  • Fixed CHW-format image handling in read_image_as_pil (#1287).
  • Validate overlap ratios in get_slice_bboxes (must be < 1.0) (#1285).
  • Corrected error message for invalid model path in RTDetrDetectionModel (#1266).
  • Fixed incorrect type annotations in the postprocess module (#1327).
  • Ultralytics model now supports additional formats with improved task handling (#1321).
  • Added pywinpty for Windows dev compatibility (#1319).

🧹 Maintenance & CI

  • Pinned all GitHub Actions to commit SHAs for supply-chain security (#1351).
  • Multi-OS CI matrix and clearer workflow naming (#1334).
  • Bumped to Python 3.12/3.13 in CI and docs (#1259, #1260).
  • Removed deprecated YOLOv5 helpers, legacy requirements.txt, MMDet workflow, and unused Netlify config (#1326, #1342, #1341, #1335).
  • numpy<3.0, torchvision 0.23.0, and many dependency bumps via Dependabot (now also covering pip).

🙏 Contributors

Thanks to everyone who contributed to this release:
@onuralpszr, @fcakyon, @siromermer, @ZephyrKeXiner, @yogendrasinghx, @srikrishnavignesh, @ibuldakov, @ducviet00, @volks73, @RizwanMunawar, @nikvo1, @vinnik-dmitry07, and @gboeer and @dependabot for keeping dependencies fresh.

🌟 New Contributors

Full Changelog: 0.11.34...0.12.0

v0.11.36 Hot fix Release

28 Sep 22:20
0.11.36
68e6198

Choose a tag to compare

What's Changed

This release torch import error in cli

Full Changelog: 0.11.35...0.11.36

v0.11.35 Release

26 Sep 19:43
0.11.35
46a096b

Choose a tag to compare

What's Changed

  • Fix currently failing CI by adding a hatch build target by @gboeer in #1245
  • refactor: ♻️ improve readability and type hints across codebase by @onuralpszr in #1249
  • Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #1244
  • refactor: ♻️ update CI workflow for multi-OS support and improve job naming by @onuralpszr in #1250
  • Fix empty bbox because of empty shapely_annotation.multipolygon by @vinnik-dmitry07 in #1140
  • Significantly improve postprocessing speed (NMS, NMM, GREEDYNMM) by using STRtree from shapely by @nikvo1 in #1248
  • fix: 🐞 add optional dependencies and improve package management in models and late import for torch to fix ci by @onuralpszr in #1251

New Contributors

Full Changelog: 0.11.34...0.11.35

v0.11.34 Release

31 Aug 11:02
098c066

Choose a tag to compare

What's Changed

  • docs: add mkdocs material badge for support by @onuralpszr in #1236
  • Fix: Models always loaded on "cuda:0" when working inside subprocesses on multi-GPU setups by @malopez00 in #1230
  • refactor: Update category remapping logic to work with immutable categories by @gboeer in #1234
  • feat: add support for torchvision Mask R-CNN instance segmentation model by @curtiskennedy in #1238
  • refactor: make exif rotation on image read by default and use PIL built-in ImageOps instead by @fcakyon & @onuralpszr in #1239
  • build: Bump version from 0.11.33 to 0.11.34 by @fcakyon in #1241

New Contributors

Full Changelog: 0.11.33...0.11.34

v0.11.33 Release

22 Aug 11:34
d410fa2

Choose a tag to compare

What's Changed

  • docs: Simplify and improve context7 config by @fcakyon in #1218
  • build: Eliminate unnecessary CI workflow triggers by @fcakyon in #1219
  • fix: Fix incorrect context7 config structure by @fcakyon in #1220
  • refactor: 🧹 improve test and utility code organization by @onuralpszr in #1223
  • 👷 Bump actions/checkout from 4 to 5 by @dependabot[bot] in #1229
  • fix: 🐛 Update version to 0.11.33 to fix sahi installation in dev by @onuralpszr in #1233

Full Changelog: 0.11.32...0.11.33

v0.11.32

02 Aug 11:33
15c7092

Choose a tag to compare

What's Changed

  • docs: 📝 Introduce mkdocs-material to sahi project to have documentation page by @onuralpszr in #1210
  • 👷 Bump astral-sh/setup-uv from 5 to 6 by @dependabot[bot] in #1211
  • fix: 🐞 update deployment branch from 'develop' to 'main' in publish_docs workflow by @onuralpszr in #1212
  • docs: 📝 Introduce mkdocs-material to sahi project to have documentation page by @onuralpszr in #1213
  • Add DeepWiki documentation badge in README.md by @RizwanMunawar in #1215
  • refactor: 🛠 remove redundant logging imports and centralize logger configuration by @onuralpszr in #1214
  • update version to 0.11.32 by @fcakyon in #1216

New Contributors

Full Changelog: 0.11.31...0.11.32

0.11.31

15 Jul 08:41
cdb5aeb

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.11.30...0.11.31

0.11.30

08 Jul 16:33
a7f4e85

Choose a tag to compare

SAHI v0.11.30 Release Notes

We're excited to announce SAHI v0.11.30 with improved performance tracking, enhanced testing
infrastructure, and better developer experience!

📈 Milestones

  • Academic papers citing SAHI reached 400! (#1168)

🚀 Key Updates

Performance & Monitoring

  • Fixed postprocess duration tracking in get_sliced_prediction - now properly separates slice,
    prediction, and postprocess timings for accurate performance monitoring
    (#1201) - Thanks @Toprak2!

Framework Updates

  • Refactored Ultralytics support with ONNX model support and better compatibility
    (#1184)
  • Updated TorchVision support to latest API (#1182)
  • Improved Detectron2 support with better config handling to prevent KeyError issues
    (#1116) - Thanks @Arnesh1411!
  • Added Roboflow framework support for RF-DETR models from the Roboflow Universe
    (#1161) - Thanks @nok!
  • Removed deepsparse integration as the framework is no longer maintained
    (#1164)

Testing Infrastructure

  • Migrated test suite to pytest (#1187)
    • Tests now run faster with better parallel execution
    • Extended Python version coverage (3.8, 3.9, 3.10, 3.11, 3.12)
    • Updated to more recent PyTorch versions for better compatibility testing
    • Improved test organization and maintainability
  • Refactored MMDetection tests for better reliability (#1185)

Developer Experience

  • Added Context7 MCP integration for AI-assisted development
    (#1198)

🛠️ Improvements

Code Quality & Safety

  • Immutable bounding boxes for thread-safe operations (#1194,
    #1191) - Thanks @gboeer!
  • Enhanced type hints and docstrings throughout the codebase
    (#1195) - Thanks @gboeer!
  • Overloaded operators for prediction scores enabling intuitive score comparisons
    (#1190) - Thanks @gboeer!
  • PyTorch is now a soft dependency improving flexibility
    (#1162) - Thanks @ducviet00!

Infrastructure & Stability

  • Improved dependency management and documentation (#1183)
  • Enhanced pyproject.toml configuration for better package management
    (#1181)
  • Optimized CI/CD workflows for MMDetection tests (#1186)

🐛 Bug Fixes

  • Fixed CUDA device selection to support devices other than cuda:0
    (#1158) - Thanks @0xf21!
  • Corrected parameter naming from 'confidence' to 'threshold' for consistency
    (#1180) - Thanks @nok!
  • Fixed regex string formatting in device selection function
    (#1165)
  • Resolved torch import errors when PyTorch is not installed
    (#1172) - Thanks @ducviet00!
  • Fixed model instantiation issues with AutoDetectionModel.from_pretrained
    (#1158)

📦 Dependencies

  • Updated OpenCV packages from 4.10.0.84 to 4.11.0.86 (#1171) -
    Thanks @ducviet00-h2!
  • Removed unmaintained matplotlib-stubs dependency (#1169)
  • Cleaned up unused configuration files (#1199)

📚 Documentation

  • Added context7.json for better AI tool integration (#1200)
  • Updated README with new contributors (#1175,
    #1179)
  • Added Roboflow+SAHI Colab tutorial link (#1177)

Acknowledgments

Special thanks to all contributors who made this release possible: @nok, @gboeer, @Toprak2, @Arnesh1411,
@0xf21, @ducviet00, @ducviet00-h2, @p-constant, and @fcakyon!


Full Changelog: 0.11.24...0.11.30

0.11.29

04 Jul 09:45
7966c42

Choose a tag to compare

What's Changed

Full Changelog: 0.11.28...0.11.29