Computer vision answers · Object Detection
How do I set tile overlap for small object detection in large images?
So objects on a tile edge are not cut in half or missed.
Short answer
Set the overlap between tiles to at least the size of the largest object you need to find, in pixels, so every object sits whole inside at least one tile, then merge the duplicates from neighboring tiles. Roboflow's Image Slicer and Detections Stitch blocks do both, and you can build and run them on Roboflow's free plan. Use the same tile size for training and inference, so objects appear at the same scale the model learned them at.
Skip the setup. Describe your images.
Describe your images and what you need to find. The agent sets up labeling, training and deployment with you.
Key facts
- What you need
- Large images and a detection model trained on tiles of them
- What you get
- Small objects found across the whole image, each counted once
- Image sources
- Drone, satellite, microscope and high-resolution camera images
- Runs on
- Cloud API, or an edge device or server running Docker

How to set tile overlap for small objects, step by step
Six steps from a large image to every small object found once.
Connect Roboflow to your coding agent, ChatGPT or Codex
Measure your largest object in pixels
Label your images and train on tiles of the same size
Set the overlap to at least your largest object
Run tiled inference and merge the duplicates
Pythonimport cv2 import supervision as sv from inference import get_model model = get_model("your-project/1") image = cv2.imread("aerial_0031.jpg") LARGEST_OBJECT_PX = 80 # widest object you need to find def callback(tile): return sv.Detections.from_inference(model.infer(tile, confidence=0.4)[0]) slicer = sv.InferenceSlicer(callback=callback, slice_wh=640, overlap_wh=LARGEST_OBJECT_PX + 20, overlap_filter="non_max_suppression") detections = slicer(image) print(len(detections), "objects found") # 214 objects foundRather not write code? Ask the Roboflow agent to set this up for you
Build the tiling into a Workflow
Why 2 million engineers build on Roboflow
Label faster
Auto-label with SAM 3 or your own model, then fix the misses instead of drawing every box.
RF-DETR
Roboflow’s open-source real-time detection model, built for accuracy (opens in a new tab) on small objects.
Logic built in
Counting, zones, tracking and alerts are ready-made Workflow blocks, so there is less code to write.
Your model, your weights
Use your trained weights on every plan, including free, through the open-source Inference package.
Run it anywhere
Self-host on a workstation, Docker, an on-prem GPU or an edge device, or call the cloud API.