SAHI
A Python vision library that detects small objects in large images through sliced inference, with support for YOLO, Hugging Face and other detectors.

SAHI is a Python computer vision library for developers detecting small objects in large images, including aerial imagery and surveillance footage. It divides images into smaller regions for detection, helping models find objects that occupy few pixels.
- Sliced detection and segmentation: Apply slicing to object detection and instance segmentation without additional model fine-tuning, or use slicing-aided fine-tuning.
- Detector integrations: Work with Ultralytics YOLO, Hugging Face Transformers, RT-DETR, TorchVision, MMDetection, Detectron2 and Roboflow RF-DETR models.
- Images, videos and streams: Run predictions through Python APIs or a command-line interface.
- Evaluation and inspection: Examine error analysis plots and explore detection results interactively through the FiftyOne integration.
- Dataset preparation: Slice large images and datasets, convert COCO data to YOLO format, and filter, merge, split or subsample datasets.
SAHI is open source under the MIT license and runs inference locally with a separately installed detection framework and model. It doesn't require a cloud service. Detector code and weights retain their own licenses; SAHI doesn't require a single checkpoint.