Source-linked AI summary

ROI-Gated SAHI: Content-Adaptive Slicing-Based Inference for Efficient Object Detection

Rashid Riyadh, Abd Ullah Khan, Imad Gohar, Muzammil Behzad

arXiv:2608.23923v1cs.CV

TL;DR

Small-object detection with SAHI improves accuracy in high-resolution images but can waste computation on background tiles. ROI-Gated SAHI uses lightweight foreground estimation to selectively refine informative regions, with adaptive fallback for dense scenes. Results show the largest gains in sparse scenes, while policy-based routing supports more stable average behavior.

  • Problem

    Slicing-based inference can process background regions with the same cost as foreground, creating redundant computation across scenes with different object densities.

  • Method

    ROI-Gated SAHI uses lightweight ROI estimation, selective sliced refinement, and fallback to full-image SAHI when foreground coverage is high.

  • Results

    6.90× speedup was achieved for the 2.7% ROI case, while the COCO128 full split showed static ROI-gating slower than Full SAHI on average.

  • Takeaways & Limitations

    ROI-gated slicing is most effective in sparse scenes, and adaptive routing is important for stable performance across scene conditions.

  • Takeaways & Limitations

    Fixed thresholds may limit generalizability, and the evaluations consider only YOLO-based detectors.

Abstract

from arXiv · show

Slicing-Aided Hyper Inference (SAHI) improves small object detection in high-resolution images but often spends substantial compute on background tiles. We propose region-of-interest (ROI)-Gated SAHI, an inference-time framework that introduces a lightweight proposer to localize foreground regions and restrict sliced refinement to informative areas. We evaluate the framework in two settings. On the COCO128 full split dataset comprising 128 images, static ROI-gating is slower on average than Full SAHI, achieving a speed ratio of 0.88, and yields a lower mAP@0.5 of 0.6602 compared with 0.7569 for Full SAHI. A simple adaptive routing policy with $τ=$ 0.4 educes the mean latency, achieving a slight gain of 1.02$\times$ over Full SAHI. On a three-image sparse-to-dense case study, ROI-gating achieves speedups ranging from 0.96$\times$ to 6.90$\times$ with a mean speedup of 3.41$\times$. These results show that ROI-gating is most beneficial in sparse scenes and requires policy-based routing for robust average behavior.

I. INTRODUCTION

Small-object detection in high-resolution images requires preserving fine spatial detail while controlling computational cost. ROI-Gated SAHI addresses background-heavy tiled inference with content-adaptive gating, compatibility with existing detectors, and fallback for dense scenes.

  • I. INTRODUCTION: High-resolution small-object detection incurs memory and latency costs that hinder deployment on resource-constrained platforms.The challenge arises from maintaining fine-grained spatial details while processing high-resolution images.
  • I. INTRODUCTION: SAHI partitions images into overlapping tiles, detects objects independently, and merges predictions, but its cost grows with tile count.Uniform application also processes background regions with little or no relevant information.
  • I. INTRODUCTION: ROI-Gated SAHI uses lightweight ROI estimation to restrict sliced refinement to regions with overlapping foreground ROIs.This bypasses background-only areas before computationally intensive tiled inference.
  • I. INTRODUCTION: The framework remains compatible with existing detectors and slicing pipelines because ROI reasoning is decoupled from detector architectures.It performs adaptive computation at inference time without model retraining or architectural changes.
  • I. INTRODUCTION: An intelligent fallback reverts to conventional full-image SAHI when selective gating becomes counterproductive in dense scenes.The framework also evaluates ROI coverage, tile-count reduction, latency, detection accuracy, and qualitative pipeline behavior across scene densities.

II. RELATED WORK

Prior work improves small-object detection through slicing or reduces redundancy through ROI-based methods, but does not explicitly combine lightweight foreground estimation with selective tiled inference. ROI-Gated SAHI positions efficiency as content-adaptive inference without retraining or detector redesign.

  • II. RELATED WORK: Slicing-based inference improves small-object detection without changing detector architecture by enlarging objects within overlapping tiles.SAHI independently detects objects on tiles and merges predictions through post-processing.
  • II. RELATED WORK: SAHI’s tile-dependent cost becomes inefficient in sparse scenes or images dominated by background.Prior adaptive methods adjust slice configuration, while other approaches add teacher–student refinement and semantic graphs.
  • II. RELATED WORK: ROI-based methods focus processing on candidate object regions but can still incur high-resolution feature-extraction costs across the entire image.Two-stage detectors commonly use region proposal networks before refining detections.
  • II. RELATED WORK: ROI-Gated SAHI combines lightweight foreground estimation, selective slicing, and fallback to full-image SAHI under dense foreground conditions.This explicitly integrates ROI filtering with slicing while preserving compatibility with existing detectors.
  • II. RELATED WORK: The framework formulates efficiency as content-adaptive inference, exploiting foreground sparsity to gate slicing without retraining or architectural changes.Its intended deployment scope includes resource-constrained systems.

III. METHODOLOGY

ROI-Gated SAHI uses a lightweight proposer to localize foreground regions, then adaptively applies selective or full-image sliced refinement and fuses detections globally.

  • Framework overview: ROI-Gated SAHI restricts sliced processing to foreground regions instead of uniformly tiling the entire image.The framework preserves standard detectors and adds adaptive gating during inference.
  • Stage A: Proposer: The proposer downsamples the high-resolution input and generates coarse candidate regions with low computational overhead.Recall is prioritized over precision so foreground regions are captured before refinement.
  • Stage B: Decision: Stage B removes redundant proposals with NMS, expands retained boxes by α = 0.15, and computes total ROI coverage for routing.The expansion provides contextual coverage around proposed objects.
  • Stages C–D: Refinement: When coverage is low, ROI-Gated SAHI partitions ROI regions into overlapping 640×640 tiles; otherwise, Full-SAHI processes the complete image grid.ROI processing reduces the number of refined tiles relative to Full-SAHI.
  • Stage E: Fusion: The proposer and refiner detections are combined and consolidated with global NMS to produce final detections.The refiner uses YOLOv8s for high-resolution detection.

C. Model Latency and Analysis

The latency analysis identifies a break-even ROI coverage below which ROI-Gated SAHI becomes more efficient than Full SAHI.

  • Break-even analysis: The break-even ROI ratio defines the coverage threshold below which ROI-Gated SAHI has lower latency than Full SAHI.Latency is modeled using per-tile inference time, constant overhead, and ROI coverage.

D. Fallback Strategy

The fallback strategy routes dense scenes to Full-SAHI while retaining ROI-gated refinement for sparse scenes, using the same trained detectors during inference.

  • Routing policy: τ = 0.40 routes images with R ≥ 0.40 to Full-SAHI and images with R < 0.40 to ROI-Gated SAHI.The threshold was empirically calibrated on COCO128 to balance efficiency and detection reliability.
  • Dense-scene fallback: The fallback accounts for dense-scene proposer recall degradation, computational overhead variability, and resolution-dependent tile distributions.Full-image refinement is activated when comprehensive coverage is required.
  • Selective inference: ROI-Gated SAHI applies SAHI only to selected ROI regions, then combines processed-patch detections with global NMS.Full-SAHI instead divides the entire image into overlapping patches.
  • Implementation: The inference pipeline is implemented with publicly available detection and slicing libraries and is intended to be reproducible across hardware types.The evaluation uses YOLOv8n as proposer and YOLOv8s as refiner.

G. Evaluation Strategy

The evaluation combines a 128-image COCO128 dataset experiment with three scene-density case studies, using latency and detection accuracy as core indicators.

  • Evaluation settings: Two evaluation settings are reported separately: full COCO128 and three high-resolution images spanning sparse, moderate, and dense distributions.The separation distinguishes aggregate dataset statistics from localized scene behavior.
  • Metrics and pipeline: The evaluation measures detection accuracy and execution time for the ROI-Gated SAHI pipeline.Algorithm 1 takes an image, threshold, proposer, and refiner as inputs and returns final detections.
  • Inference procedure: The algorithm generates candidate detections, merges and expands proposal boxes, computes ROI coverage, and routes either ROI-only or full-image SAHI tiles.Selected tiles are subsequently refined using the high-resolution detector.
  • Output generation: Global fusion combines proposer and refiner outputs after tiled refinement to produce the final detections.This fusion step follows the routing and refinement stages.

IV. RESULTS AND DISCUSSION

On COCO128, static ROI-gating underperforms Full SAHI overall, while adaptive routing slightly improves average latency. ROI-based processing is most advantageous in sparse scenes and loses efficiency as ROI coverage increases.

  • Overall evaluation: 0.88 speed ratio: Static ROI-Gated SAHI is slower than Full SAHI overall and achieves lower mAP@0.5, 0.6602 versus 0.7569.The comparison uses mean latencies of 298.24 ms for static ROI-Gated SAHI and 263.73 ms for Full SAHI.
  • Adaptive routing: 1.02× speedup: adaptive routing with τ = 0.40 reduces mean latency to 258.46 ms relative to Full SAHI.The policy routes 26 of 128 images to ROI-based processing.
  • ROI regimes: ROI-Gated processing is faster in sparse regimes but slower in moderate and dense regimes as more regions require processing.Higher region counts introduce routing and coordination overhead, with the gap most visible in dense scenes.
  • Threshold selection: The threshold sweep shows latency initially decreases as τ increases, reaches a minimum around τ ≈ 0.5, and then increases with additional routing overhead.The number of images routed to the ROI pipeline also increases with τ.
  • ROI coverage: As ROI coverage increases, per-image speed advantages diminish: low-coverage points generally exceed the 1.0 break-even ratio, while medium coverage is mixed.The speed ratio is defined as Full SAHI divided by ROI processing.

C. Performance Dynamics Across ROI Regimes

The case study evaluates ROI-Gated SAHI across sparse, moderate, and dense high-resolution scenes using latency, speedup, ROI coverage, and detection agreement.

  • Case-study design: Three representative COCO128 images cover sparse, moderate, and dense ROI regimes for evaluating latency, speedup, coverage, and detection agreement.The measurements are summarized in Tables II–V.

1) Latency and Speedup Analysis:

The three-image case study shows that ROI-Gated SAHI delivers its largest latency gains when foreground occupies little image area. Its speed advantage declines with coverage, while localization remains highly aligned with Full SAHI.

  • Aggregate results: 3.41× mean speedup: ROI-Gated SAHI improves efficiency across the selected cases at 33.0% average ROI coverage.The reported aggregate covers the three-image case study.
  • Per-image regimes: 6.90× speedup: the sparse scene falls from 526.52 ms to 76.25 ms at 2.7% ROI coverage.The moderate scene achieves 2.38× speedup at 26.4% coverage, while the dense scene reaches only 0.96× at 69.9% coverage.
  • Coverage dynamics: Speedup is inversely related to ROI coverage because smaller foreground regions allow more tiles to be skipped.The relationship is examined across foreground-density regimes.
  • Detection agreement: Mean IoU ranges from 0.87 to 0.98, indicating highly consistent localization with the Full SAHI baseline when objects are detected.Mean F1 is 0.544 because total detection counts differ.
  • Qualitative results: Qualitative results show focused computation with preserved spatial localization quality, including the 6.90× gain in the 2.7% ROI case.This result is consistent with the latency comparison for the sparse scene.

E. Discussion

ROI-Gated SAHI exhibits distinct coverage-dependent regimes: it provides the strongest speedups in sparse scenes, but its accuracy and average latency can suffer when proposals miss regions or coverage is high. Adaptive fallback improves average behavior by routing high-coverage images to Full SAHI.

  • Coverage-dependent performance: Up to 6.90× speedups occur below 30% coverage because only a small part of the image requires processing.Sparse scenes provide the greatest tile-saving potential.
  • Coverage-dependent performance: 2× to 3× gains typically occur between 30% and 75% coverage, although performance becomes more variable as processed area increases.The trend appears in aggregate statistics and case-study results.
  • Efficiency–accuracy trade-off: 0.6602 mAP@0.5 for ROI-Gated SAHI compares with 0.7569 for Full SAHI on COCO128 full split.The proposer can miss object regions, propagating omissions to refinement, while matched detections retain closely aligned IoU-based localization quality.
  • Case studies: 69.9% ROI yields near-baseline latency, 26.4% ROI enables selective computation while preserving localization quality, and 2.7% ROI produces the largest efficiency gain.The three case studies illustrate dense, moderate, and sparse coverage regimes, respectively.
  • Adaptive fallback: 0.88× average speed ratio for static ROI-gating increases to 1.02× with τ = 0.40 adaptive fallback relative to Full SAHI.The fallback dynamically routes high-coverage images to Full SAHI, removing average-case slowdowns while retaining sparse-scene gains.

Practical Implications:

ROI-Gated SAHI is most suitable when scene density varies and low latency matters, especially in sparse scenes. Its deployment scope is bounded by proposer recall, fixed configuration thresholds, and evaluation limited to YOLO-based detectors.

  • Practical implications: Sparse scenes can provide considerable computational savings without reducing detection quality when low latency is critical.The approach is presented as suitable for applications with varying scene density.
  • Practical implications: Adaptive or policy-based routing should be considered for datasets mixing sparse and dense scenes to avoid regressions from static configurations.Routing selects between strategies according to each image’s scene conditions.
  • Limitations: Proposer recall limits the framework because missed proposal regions cannot be recovered during later stages.This constrains detection completeness when foreground regions are not identified before refinement.
  • Limitations: Fixed ROI thresholds and evaluation only with YOLO-based detectors limit demonstrated generalizability across scene characteristics and detector architectures.Alternative detection architectures were not included in the reported evaluation.
  • Evaluation implications: 0.88× static speed ratio and lower mAP@0.5 motivate fallback routing, which reaches 1.02× at τ = 0.40 relative to Full SAHI.The conclusion reports static average slowdown, accuracy reduction, and adaptive-routing improvement on COCO128 full split.
  • Conclusion and future work: Sparse content is the setting where ROI-gated slicing is most effective, while adaptive routing is important for stable performance across scene conditions.Future directions include learned gating, multi-scale and class-aware ROI selection, and video application.
Loading 2608.23923v1…