Hey everyone!
I've been working on this for the past few months and finally got around to releasing the first version. It's called EASI (Edge-Aware Sliced Inference), available as easi-cv on PyPI.
The idea is pretty simple. If you've ever tried running object detection on high-resolution images, you've probably noticed that small objects tend to disappear. Most detectors operate around 640px, so when you resize a 4K image down to that, a 30px car ends up being roughly 5px. There's not much left for the model to detect at that point.
The usual workaround is sliced inference, where you split the image into smaller tiles, run detection on each tile, and merge the results. SAHI is probably the most familiar implementation of this.
I ran into two issues while using it for another project:
- It was surprisingly slow, even on machines with fairly powerful GPUs. After profiling, I found that CPU-based slicing was becoming a bottleneck. One CPU core was constantly maxed out while the GPU was often sitting idle.
- Objects near tile boundaries could get split into two separate bounding boxes, making it difficult to merge detections properly.
I started wondering if the slicing and batching could be moved directly onto the GPU instead. I also wanted a better way to handle objects that get cut across neighbouring tiles.
Couldn't find an implementation that did both the way I wanted, so I ended up building one myself. That's how EASI started.
What it does
- Slices images directly on the GPU and runs tiles in batches.
- Merges objects split across tile boundaries using neighbouring tile information.
- Supports Ultralytics models (YOLO11, YOLO26, RT-DETR, TensorRT/ONNX), torchvision, Hugging Face models (including RF-DETR), and custom callables.
- Runs on NVIDIA, AMD and Apple Silicon GPUs, with CPU fallback.
I spent quite a bit of time benchmarking it against the existing alternatives. Here are some results.
Speed
Setup: YOLO11n, 3840 × 2160, 640px tiles, 20% overlap, batch size 16, FP16, RTX 3090. The input frame starts in CPU memory, and all implementations use the same weights, tiles, thresholds and batch size.
| Library | Time per frame |
|---|
| EASI | 23.0 ms |
| Ultralytics tiling | 51.9 ms |
| Supervision | 54.6 ms |
| SAHI | 113.6 ms |
A few other numbers:
- At 1080p, EASI runs YOLO11n at around 155 FPS. The next fastest implementation I tested was around 59 FPS.
- With TensorRT at 4K, EASI takes 19.2ms compared to 43.1ms for Ultralytics tiling.
- On an Apple M3 Pro GPU (FP32), the difference is smaller: 169ms vs 210ms for Ultralytics.
Accuracy
I also wanted to make sure the speed improvements weren't coming at the cost of detection quality.
Using YOLO11s fine-tuned on VisDrone, with 640px tiles and FP16:
| Library | Test-dev AP |
|---|
| EASI | 0.262 |
| Ultralytics tiling | 0.262 |
| Supervision | 0.251 |
| SAHI | 0.251 |
The seam merging itself adds around 1.1 AP points compared to using plain NMS on the same tiles (0.262 vs 0.251).
There are also a few optional settings if you're willing to trade inference time for accuracy:
full_frame_size=1280: Adds a full-image inference pass. Improved validation AP from 0.334 to 0.350, costing another 6-10ms per frame on an RTX 3090.zoom_size=1280: Re-runs tiles containing lots of small objects at 2x resolution. Improved test-dev AP from 0.262 to 0.276.flip_tta=True: Improved test-dev AP from 0.262 to 0.272, at roughly twice the inference time.- Combining zoom, full-frame inference and
multi_label=True gave a 4.4 AP point improvement on validation and 2.9 points on test-dev (FP32).
These options aren't free, obviously. They can add quite a bit of inference time depending on the image and hardware.
A few limitations
- At default settings, it ties Ultralytics tiling on AP rather than beating it.
- CPU-only performance is roughly comparable to the other libraries. The speed advantage mainly comes from GPU execution.
- Exported models (TensorRT/ONNX) are compiled for a fixed input size, so variable-size
zoom_size and full_frame_size require .pt weights. - Only axis-aligned bounding boxes are supported for now. No segmentation masks or rotated boxes.
If anyone wants to give it a try:
pip install "easi-cv[ultralytics,fast]"
import easi
det = easi.predict("drone_4k.jpg", "yolo11n.pt")
GitHub: https://github.com/RajChaudhary01/EASI
PyPI: https://pypi.org/project/easi-cv/PyPI
There's also a Colab notebook in the README where you can run plain YOLO, SAHI, Supervision and EASI on the same VisDrone image. One thing worth mentioning: that particular image was selected as EASI's best case from the validation set, and the notebook explicitly discloses this.
I'm the author, so obviously I'm a little biased, but I'd genuinely appreciate people trying it out and pointing out where it doesn't work well.
I'm especially curious about what image sizes and detectors people here use for sliced inference, and whether you've run into similar issues with tile boundaries.
Next, I'll be researching how to increase accuracy with minimal speed loss, edge-device support, and other practical areas like segmentation, etc. Any help, ideas, or contributions are much appreciated.
Thanks for taking a look!