Tiling is especially helpful and can improve accuracy for aerial images and small object detection. Like the human eye, computer vision models can have a difficult time detecting small objects from far away because it gives us less visual data to do accurate inference on.

The solution is to zoom in! With tiling, we can divide each image into smaller, more manageable tiles in order to zoom in on smaller sections of the image and do more accurate training and inference.

The trick here is to ensure that you are tiling both during training and inference, and that the tiles used are of a similar size. Training using tiling, then attempting to do inference on non-tiled images can result in false positive detections where the model attempts to detect objects of the wrong size.

For example, this is a model trained to detect cars from aerial photos. Tiling was used during training for better accuracy, but not during inference. Notice, the model detects larger shapes than what is needed.

After applying tiling at inference, we get much better accuracy.

How to Tile During Training

To tile during training, use the tiling preprocessing step during training in the Generate section like so:


How to Tile During Inference

You can apply tiling while running inference on your images using Supervision, a open-source computer vision utility. Using the InferenceSlicer, we can run our inferences with a tiled segment of the image. Learn more how to use SAHI in this blog posts.

Previous versions of this article mentions the use of a tile parameter in our Hosted API. The Roboflow Hosted Inference API no longer supports tiling as a parameter within the API. However, it is still possible using Slicing Aided Hyper Inference (SAHI). Learn more in this blog post!

Balancing Accuracy vs Performance with Tiling

Tiling can increase accuracy for small object detection and aerial photos. While you might jump straight to tiling your source images into much smaller images, there are some performance considerations and drawbacks to be aware of.

Using too many tiles can result in longer training times, and objects to be detected getting cut in half during the tiling step, which can negatively affect accuracy.

Tiling can also negatively affect inference speed. Since tiling produces a number of smaller images from a larger base image, this can degrade performance if too many tiles are generated. If your performance requirements include high speed inference, tiling may not be a good fit for your use case. Take a look at our deployment guide to help find the right solution for your problem.

If you think tiling could be beneficial for your use case, we recommend generating a number of versions of your trained model with tiling at different sizes to compare accuracy vs performance of each version for best results.