sahi
Framework agnostic sliced/tiled inference + interactive ui + error analysis plots
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: scholar.google, ieee.org -
✓Committers with academic emails
2 of 54 committers (3.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Framework agnostic sliced/tiled inference + interactive ui + error analysis plots
Basic Info
- Host: GitHub
- Owner: obss
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://obss.github.io/sahi/
- Size: 176 MB
Statistics
- Stars: 4,779
- Watchers: 49
- Forks: 692
- Open Issues: 11
- Releases: 107
Topics
Metadata Files
README.md
SAHI: Slicing Aided Hyper Inference
A lightweight vision library for performing large scale object detection & instance segmentation
Overview
SAHI helps developers overcome real-world challenges in object detection by enabling sliced inference for detecting small objects in large images. It supports various popular detection models and provides easy-to-use APIs.
| Command | Description | |---|---| | predict | perform sliced/standard video/image prediction using any ultralytics/mmdet/huggingface/torchvision model - see CLI guide | | predict-fiftyone | perform sliced/standard prediction using any supported model and explore results in fiftyone app - learn more | | coco slice | automatically slice COCO annotation and image files - see slicing utilities | | coco fiftyone | explore multiple prediction results on your COCO dataset with fiftyone ui ordered by number of misdetections | | coco evaluate | evaluate classwise COCO AP and AR for given predictions and ground truth - check COCO utilities | | coco analyse | calculate and export many error analysis plots - see the complete guide | | coco yolo | automatically convert any COCO dataset to ultralytics format |
Approved by the Community
📜 List of publications that cite SAHI (currently 400+)
🏆 List of competition winners that used SAHI
Approved by AI Tools
SAHI's documentation is indexed in Context7 MCP, providing AI coding assistants with up-to-date, version-specific code examples and API references. We also provide an llms.txt file following the emerging standard for AI-readable documentation. To integrate SAHI docs with your AI development workflow, check out the Context7 MCP installation guide.
Installation
Basic Installation
bash
pip install sahi
Detailed Installation (Click to open)
- Install your desired version of pytorch and torchvision: ```console pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu126 ``` (torch 2.1.2 is required for mmdet support): ```console pip install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/cu121 ``` - Install your desired detection framework (ultralytics): ```console pip install ultralytics>=8.3.161 ``` - Install your desired detection framework (huggingface): ```console pip install transformers>=4.49.0 timm ``` - Install your desired detection framework (yolov5): ```console pip install yolov5==7.0.14 sahi==0.11.21 ``` - Install your desired detection framework (mmdet): ```console pip install mim mim install mmdet==3.3.0 ``` - Install your desired detection framework (roboflow): ```console pip install inference>=0.50.3 rfdetr>=1.1.0 ```Quick Start
Tutorials
Introduction to SAHI - explore the complete documentation for advanced usage
Official paper (ICIP 2022 oral)
2025 Video Tutorial (RECOMMENDED)
'VIDEO TUTORIAL: Slicing Aided Hyper Inference for Small Object Detection - SAHI'
Error analysis plots & evaluation (RECOMMENDED)
Interactive result visualization and inspection (RECOMMENDED)
Framework Agnostic Sliced/Standard Prediction

Find detailed info on using sahi predict command in the CLI documentation and explore the prediction API for advanced usage.
Find detailed info on video inference at video inference tutorial.
Error Analysis Plots & Evaluation

Find detailed info at Error Analysis Plots & Evaluation.
Interactive Visualization & Inspection

Explore FiftyOne integration for interactive visualization and inspection.
Other utilities
Check the comprehensive COCO utilities guide for YOLO conversion, dataset slicing, subsampling, filtering, merging, and splitting operations. Learn more about the slicing utilities for detailed control over image and dataset slicing parameters.
Citation
If you use this package in your work, please cite as:
bibtex
@article{akyon2022sahi,
title={Slicing Aided Hyper Inference and Fine-tuning for Small Object Detection},
author={Akyon, Fatih Cagatay and Altinuc, Sinan Onur and Temizel, Alptekin},
journal={2022 IEEE International Conference on Image Processing (ICIP)},
doi={10.1109/ICIP46576.2022.9897990},
pages={966-970},
year={2022}
}
bibtex
@software{obss2021sahi,
author = {Akyon, Fatih Cagatay and Cengiz, Cemil and Altinuc, Sinan Onur and Cavusoglu, Devrim and Sahin, Kadir and Eryuksel, Ogulcan},
title = {{SAHI: A lightweight vision library for performing large scale object detection and instance segmentation}},
month = nov,
year = 2021,
publisher = {Zenodo},
doi = {10.5281/zenodo.5718950},
url = {https://doi.org/10.5281/zenodo.5718950}
}
Contributing
We welcome contributions! Please see our Contributing Guide to get started. Thank you 🙏 to all our contributors!
Owner
- Name: Open Business Software Solutions
- Login: obss
- Kind: organization
- Email: rcm@obss.tech
- Location: Istanbul
- Website: https://obss.tech
- Twitter: obsstech
- Repositories: 13
- Profile: https://github.com/obss
Open Source for Open Business
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this package, please consider citing it."
authors:
- family-names: "Akyon"
given-names: "Fatih Cagatay"
- family-names: "Cengiz"
given-names: "Cemil"
- family-names: "Altinuc"
given-names: "Sinan Onur"
- family-names: "Cavusoglu"
given-names: "Devrim"
- family-names: "Sahin"
given-names: "Kadir"
- family-names: "Eryuksel"
given-names: "Ogulcan"
title: "SAHI: A lightweight vision library for performing large scale object detection and instance segmentation"
preferred-citation:
type: article
title: "Slicing Aided Hyper Inference and Fine-tuning for Small Object Detection"
doi: 10.1109/ICIP46576.2022.9897990
url: https://ieeexplore.ieee.org/document/9897990
journal: 2022 IEEE International Conference on Image Processing (ICIP)
authors:
- family-names: "Akyon"
given-names: "Fatih Cagatay"
- family-names: "Altinuc"
given-names: "Sinan Onur"
- family-names: "Temizel"
given-names: "Alptekin"
year: 2022
start: 966
end: 970
GitHub Events
Total
- Create event: 63
- Release event: 14
- Watch event: 688
- Delete event: 61
- Member event: 1
- Issue comment event: 62
- Push event: 159
- Pull request review event: 70
- Pull request review comment event: 35
- Pull request event: 153
- Fork event: 103
Last Year
- Create event: 63
- Release event: 14
- Watch event: 688
- Delete event: 61
- Member event: 1
- Issue comment event: 62
- Push event: 159
- Pull request review event: 70
- Pull request review comment event: 35
- Pull request event: 153
- Fork event: 103
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| fatih | 3****n | 452 |
| Devrim | 4****u | 8 |
| Kadir Nar | k****r@h****m | 7 |
| Kadir Şahin | 6****r | 5 |
| Pranav Durai | p****0@g****m | 4 |
| Dronakurl | 7****l | 3 |
| Wei Ji | 2****4 | 3 |
| Janne Mäyrä | j****a@g****m | 2 |
| yyj | 9****s | 2 |
| So Uchida | s****a@s****m | 2 |
| M.C.V | k****v@g****m | 2 |
| JonathanKossick | j****k@p****e | 2 |
| Jacob Marks | j****3@g****m | 2 |
| Huijo | c****j@g****m | 2 |
| Hongyuan Zhang | 6****z | 2 |
| Gordon Böer | 1****r | 2 |
| Semyon | s****r@y****u | 2 |
| Gianluca Guzzetta | 3****y | 2 |
| Derrick Mwiti | m****k@g****m | 2 |
| Aynur Susuz | 8****z | 2 |
| Alzbeta Tureckova | 3****a | 2 |
| Bilgehan Kösem | b****2@g****m | 1 |
| Burak Maden | 3****k | 1 |
| Christoffer Edlund | c****d@h****m | 1 |
| Dean Wetherby | 1****e | 1 |
| Douglas Bunker | d****r@g****m | 1 |
| Dragonborn | 7****n | 1 |
| Frej Sundqvist | 2****Q | 1 |
| wey | w****o | 1 |
| sinanonur | s****c@g****m | 1 |
| and 24 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 290
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Total issue authors: 0
- Total pull request authors: 78
- Average comments per issue: 0
- Average comments per pull request: 1.2
- Merged pull requests: 227
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 0
- Pull requests: 113
- Average time to close issues: N/A
- Average time to close pull requests: 10 days
- Issue authors: 0
- Pull request authors: 27
- Average comments per issue: 0
- Average comments per pull request: 0.58
- Merged pull requests: 85
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
Pull Request Authors
- fcakyon (172)
- gboeer (8)
- kadirnar (7)
- onuralpszr (6)
- ccomkhj (6)
- mayrajeo (5)
- Dronakurl (5)
- weiji14 (4)
- bobyard-com (4)
- Alias-z (4)
- pranavdurai10 (4)
- williamlung (4)
- gguzzy (4)
- jacobmarks (3)
- Hamzalopode (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 121,780 last-month
- Total docker downloads: 483
-
Total dependent packages: 12
(may contain duplicates) -
Total dependent repositories: 72
(may contain duplicates) - Total versions: 147
- Total maintainers: 1
pypi.org: sahi
A vision library for performing sliced inference on large images/small objects
- Homepage: https://github.com/obss/sahi
- Documentation: https://github.com/obss/sahi/tree/main/docs
- License: MIT License
-
Latest release: 0.11.34
published 6 months ago
Rankings
Maintainers (1)
conda-forge.org: sahi
- Homepage: https://github.com/obss/sahi
- License: MIT
-
Latest release: 0.11.4
published over 3 years ago
