← all repositories
Koldim2001/YOLO-Patch-Based-Inference

SAHI-style tiling for YOLO, minus the friction

Python library that chops high-res images into overlapping patches so YOLO models can actually find small objects, then stitches the results back together.

YOLO-Patch-Based-Inference
Not currently ranked — collecting fresh signals.
star history

What it does

YOLO-Patch-Based-Inference is a Python library that brings SAHI-style tiling to the Ultralytics ecosystem. It slices high-resolution images into overlapping crops, runs detection or instance segmentation on each patch, then merges the results with custom NMS logic. It supports a broad roster of Ultralytics models—from YOLOv8 through YOLO12, plus FastSAM and RTDETR—and wraps the whole flow in a two-class API.

The interesting bit

Instead of treating NMS as a dumb confidence filter, the library offers an “intelligent sorter” that bins detections by area and rounded confidence, so a large mediocre box can outrank a tiny high-confidence artifact. The README also advertises “sleek customization” for visualizing both standard and patch-based results.

Key highlights

  • Broad model support: YOLOv8–YOLO12 (detection and segmentation), FastSAM, and RTDETR, using pre-trained or custom weights
  • Two-step design: MakeCropsDetectThem handles tiling and inference; CombineDetections merges overlapping predictions with configurable IOU or IOS matching
  • Batch inference mode for processing crops in parallel on GPU, trading VRAM for speed
  • Optional memory optimization for segmentation, though the README warns this sacrifices some accuracy
  • Built-in visualization helpers for both standard and patch-based results

Caveats

  • Resizing results back to the original image size is flagged as a slow operation
  • The segmentation memory-optimization mode explicitly trades accuracy for lower RAM usage
  • Tightly coupled to the Ultralytics model format; not a general-purpose tiling framework

Verdict

Worth a look if you are already in the Ultralytics YOLO orbit and need to detect small objects in large images without rewriting SAHI glue code. If you are not using YOLO-family models, this library will not help.

Frequently asked

What is Koldim2001/YOLO-Patch-Based-Inference?
Python library that chops high-res images into overlapping patches so YOLO models can actually find small objects, then stitches the results back together.
Is YOLO-Patch-Based-Inference open source?
Yes — Koldim2001/YOLO-Patch-Based-Inference is open source, released under the AGPL-3.0 license.
What language is YOLO-Patch-Based-Inference written in?
Koldim2001/YOLO-Patch-Based-Inference is primarily written in Python.
How popular is YOLO-Patch-Based-Inference?
Koldim2001/YOLO-Patch-Based-Inference has 554 stars on GitHub.
Where can I find YOLO-Patch-Based-Inference?
Koldim2001/YOLO-Patch-Based-Inference is on GitHub at https://github.com/Koldim2001/YOLO-Patch-Based-Inference.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.