#8383rd of 168 in ML frameworks and libraries
sahi
Sliced inference library for detecting small objects in large images
- Stars
- 5.6k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Nov 2026
- Language
- Python
5,204 on 21 Apr 20265,599 on 10 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
SAHI splits large images into overlapping slices, runs an object detection or instance segmentation model on each slice, and merges the results. It wraps Ultralytics YOLO, MMDetection, Hugging Face, TorchVision, Roboflow RF-DETR, YOLOv5, Detectron2 and GroundingDINO models behind one Python API and a `sahi` CLI. The CLI also slices COCO datasets, evaluates COCO AP/AR, produces error analysis plots and converts COCO to YOLO format.
Who it is for: Computer vision engineers detecting small objects in high-resolution images
Strengths
- Works with many detectors: Ultralytics, MMDetection, Hugging Face, TorchVision, RF-DETR, Detectron2
- CLI covers prediction, COCO slicing, evaluation, error analysis and COCO-to-YOLO conversion
- Installs with pip install sahi; detection frameworks are optional extras
- Backed by an ICIP 2022 paper and Colab notebooks per framework
Weaknesses
- Does not ship models; you install torch and a detection framework yourself
- mmdet support requires torch 2.1.2, and YOLOv5 needs the pinned sahi 0.12.1
- Library only: no web UI, server or hosted API
- Slicing runs one forward pass per tile, so large images cost more inference time
What it needs
- Needs torch, torchvision, ultralytics, transformers, mmdet, yolov5 or rfdetr (one of, as needed)
- Models: Ultralytics YOLO, MMDetection, Hugging Face, TorchVision, Roboflow RF-DETR
Quick answers
Is sahi open source?
Yes. Its code is on GitHub under the MIT license.
Also in ML frameworks and libraries
See all 168| Rank | Project | Score |
|---|---|---|
| 1 | transformersPython library defining open models for text, vision, audio and multimodal tasks | 94 out of 100 |
| 2 | pytorchPython tensor library with GPU support and tape-based autograd | 93 out of 100 |
| 3 | ultralyticsPython library and CLI for training and running YOLO vision models | 93 out of 100 |
| #4 | pytorch-image-modelsPyTorch library of image models, pretrained weights and training scripts | 93 out of 100 |
| #5 | supervisionPython toolkit for loading, annotating and counting computer vision detections | 92 out of 100 |