...

YOLOv8 Small Object Detection with SAHI in Python (Sliced Inference)

YOLOv8 small object detection with SAHI

Last Updated on 22/04/2026 by Eran Feit

YOLOv8 small object detection with SAHI is one of the fastest ways to improve detections when targets are tiny (distant cars, small drones, pests on leaves) and full-image inference keeps missing them.
In this tutorial, you’ll build a repeatable Python script that runs two passes on the same image: standard YOLOv8 inference, and then SAHI sliced inference (tiling + merging).

The key idea is simple: slicing gives small objects more pixels per tile, so YOLO’s features don’t collapse them during downsampling.
You’ll learn the practical knobs that actually matter—slice size, overlap ratio, confidence threshold, and merge behavior—and you’ll see the results visually in OpenCV so you can judge whether slicing is worth the speed tradeoff for your use case.