#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
Stars, last 29 weeks+395
21 Apr 2026: 5,204 stars28 Apr 2026: 5,215 stars5 May 2026: 5,224 stars12 May 2026: 5,243 stars19 May 2026: 5,264 stars26 May 2026: 5,277 stars2 Jun 2026: 5,298 stars9 Jun 2026: 5,313 stars16 Jun 2026: 5,326 stars23 Jun 2026: 5,342 stars30 Jun 2026: 5,355 stars7 Jul 2026: 5,368 stars14 Jul 2026: 5,379 stars21 Jul 2026: 5,389 stars28 Jul 2026: 5,405 stars4 Aug 2026: 5,421 stars11 Aug 2026: 5,435 stars18 Aug 2026: 5,451 stars25 Aug 2026: 5,457 stars1 Sept 2026: 5,478 stars8 Sept 2026: 5,486 stars15 Sept 2026: 5,492 stars22 Sept 2026: 5,506 stars29 Sept 2026: 5,512 stars6 Oct 2026: 5,529 stars13 Oct 2026: 5,543 stars20 Oct 2026: 5,556 stars27 Oct 2026: 5,568 stars3 Nov 2026: 5,581 stars10 Nov 2026: 5,599 stars

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
Also in ML frameworks and libraries
RankProjectScore
1transformersPython library defining open models for text, vision, audio and multimodal tasks168.8k stars+1,522 (+0.9%) in 30 daysApache-2.094 out of 100
2pytorchPython tensor library with GPU support and tape-based autograd105.4k stars+1,043 (+1.0%) in 30 dayscustom license93 out of 100
3ultralyticsPython library and CLI for training and running YOLO vision models63.3k stars+1,015 (+1.6%) in 30 daysAGPL-3.093 out of 100
#4pytorch-image-modelsPyTorch library of image models, pretrained weights and training scripts37.3k stars+101 (+0.3%) in 30 daysApache-2.093 out of 100
#5supervisionPython toolkit for loading, annotating and counting computer vision detections Live demo ↗ (opens in a new tab)51.6k stars+514 (+1.0%) in 30 daysMIT92 out of 100