A lightweight vision library for performing large scale object detection and instance segmentation
Overview
Object detection and instance segmentation are among the most crucial applications in the realm of Computer Vision. However, the challenge of detecting small objects and conducting inference on large images still leaves much to be desired. Enter SAHI, a revolutionary solution designed to assist developers in overcoming these real-world obstacles. Let’s explore how you can effectively implement SAHI in your projects.
Quick Start Examples
Tutorials
Installation
To get started with SAHI, you’ll need to install the library using pip. Here are the steps:
pip install sahi
For Windows, ensure Shapely is installed via Conda:
conda install -c conda-forge shapely
Next, install your desired versions of PyTorch and torchvision suitable for your setup. For example:
conda install pytorch=1.10.2 torchvision=0.11.3 cudatoolkit=11.3 -c pytorch
Continue installing the desired detection frameworks such as YOLOv5, Ultralytics, MMDetection, Detectron2, and more by using pip commands similar to:
pip install yolov5==7.0.13
Framework Agnostic Sliced Prediction
SAHI allows for framework agnostic sliced standard prediction. For detailed information on how to use the SAHI predict command, visit this documentation.
Troubleshooting
In case you encounter any issues during the installation or usage of SAHI, consider the following tips:
- Ensure all dependencies, especially for specific frameworks, are correctly installed.
- Verify that you have the compatible versions of the libraries as mentioned in the installation section.
- Check your Python version; compatibility can often be an issue.
If problems persist, don’t hesitate to reach out for support. For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
With SAHI, understanding and implementing complex object detection tasks become a lot smoother. It’s a bridge that connects you to an efficient way of handling large images and detecting small objects seamlessly.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

