Find small objects in massive images without retraining your model
SAHI exists because off-the-shelf detectors choke on massive images and the tiny objects hiding inside them.

What it does
SAHI is a Python library that performs sliced—or tiled—inference on large images and videos using existing object-detection and instance-segmentation models. It chops oversized inputs into overlapping patches, runs your favorite framework on each patch, and stitches the results back together. The library also includes COCO-focused utilities for slicing datasets, evaluating classwise AP and AR, exporting error-analysis plots, and converting annotations to YOLO format. Everything is exposed through a CLI and Python APIs.
The interesting bit
The clever part is that SAHI is pure glue: it does not train models, it re-frames the input so standard off-the-shelf detectors suddenly work on satellite imagery or 4K video. It plugs into Ultralytics, MMDetection, Hugging Face, TorchVision, and Roboflow without asking you to retrain or modify the underlying weights. Think of it as a microscope stage for a camera you already own.
Key highlights
- Framework-agnostic sliced inference for detection and instance segmentation
- Built-in COCO tooling: dataset slicing, evaluation, error-analysis plots, and YOLO conversion
- Interactive exploration via FiftyOne integration to inspect misdetections
- CLI and Python APIs for both prediction and dataset manipulation
- 600+ academic citations and documented use by competition winners
Caveats
- Dependency matrix can be finicky: several supported backends require specific, sometimes conflicting, PyTorch or framework versions
Verdict
Worth a look if you are doing remote sensing, satellite imagery, or any domain where images are huge and objects are small. Skip it if you only process standard webcam-resolution frames and already get good recall.
Frequently asked
- What is obss/sahi?
- SAHI exists because off-the-shelf detectors choke on massive images and the tiny objects hiding inside them.
- Is sahi open source?
- Yes — obss/sahi is open source, released under the MIT license.
- What language is sahi written in?
- obss/sahi is primarily written in Python.
- How popular is sahi?
- obss/sahi has 5.4k stars on GitHub.
- Where can I find sahi?
- obss/sahi is on GitHub at https://github.com/obss/sahi.