OCDet: Object Center Detection via Bounding Box-Aware Heatmap Prediction on Edge Devices with NPUs

Chen Xin, Thomas Motz, Andreas Hartel, Enkelejda KasneciarXiv 2024 · DOI

Introduction

Many edge-based computer vision applications, such as industrial counting or simple presence detection, require only the central location of an object rather than precise bounding boxes or masks. However, existing solutions are often ill-suited for edge hardware. Standard object detectors like YOLO are optimized for bounding box regression, which is computationally heavy and often unnecessary for center-only tasks. Conversely, keypoint detectors typically use fixed Gaussian heatmaps that fail to capture the varying aspect ratios of real-world objects. Furthermore, modern architectural components like LayerNorm or GELU often suffer from high latency on Neural Processing Units (NPUs) found in edge devices.

OCDet addresses these challenges by providing a lightweight framework specifically designed for NPU efficiency, utilizing adaptive heatmaps and a specialized loss function to achieve superior center localization.

Methodology

The OCDet framework introduces three primary innovations to optimize center detection for edge devices:

  1. Generalized Centerness (GC): Unlike standard circular Gaussian distributions, GC generates adaptive ground truth heatmaps based on bounding box annotations. By adjusting shape hyperparameters, the heatmap "stretches" to match the object's aspect ratio, providing richer spatial information for training.
  2. NPU-Friendly Architecture: The model employs a MobileNetV4 backbone and a Semantic FPN (Feature Pyramid Network). It deliberately avoids NPU-unfriendly operations, relying on standard convolutions, ReLU, and BatchNorm to maximize hardware throughput.
  3. Balanced Continuous Focal Loss (BCFL): To handle the "zero-dominant" nature of heatmap data, BCFL enhances standard Quality Focal Loss with a dynamic weighting factor ($\alpha_c$). This focuses learning on central object regions and "hard negative" background examples.

The complete pipeline, illustrating the transition from input images to predicted center coordinates, is shown in Figure 1.

The OCDet pipeline: from bounding boxes to adaptive heatmaps and NPU-optimized inference.

Experimental Results

The researchers evaluated OCDet on the COCO 2017 dataset, measuring latency on an NXP i.MX 8M Plus NPU. To accurately assess performance, they proposed the Center Alignment Score (CAS), which combines distance error (Matched Discrepancy) and detection count error (Cardinality Penalty) via Hungarian matching into a single [0, 1] metric.

OCDet demonstrates clear Pareto dominance over state-of-the-art detectors. As shown in Figure 2, OCDet variants consistently achieve a better accuracy-to-latency trade-off than YOLOv8, YOLO11, and standard keypoint (KP) baselines.

Performance comparison on COCO: OCDet consistently stays above and to the left of YOLO and KP baselines.

Key findings include:

  • Efficiency: OCDet-N (Nano) achieves a 23% higher CAS than YOLO11n while using 42% fewer parameters and reducing NPU latency by 64% (10.94ms vs. 30.77ms).
  • Localization Accuracy: Compared to standard keypoint methods, OCDet improves CAS by up to 186% under identical model configurations.
  • Hardware Optimization: The study confirms that standard convolutional blocks often outperform "modern" transformer-style blocks on NPUs, despite having higher theoretical FLOP counts, because the hardware is specifically optimized for them.

Discussion and Limitations

Ablation studies highlight that matching heatmap shapes to object categories significantly boosts localization. However, OCDet faces challenges with very small objects ($CAS_S$), where pixel-level quantization in the heatmap leads to larger relative errors. Additionally, like most heatmap-based approaches, performance can degrade in extremely crowded scenes where object centers overlap. Future work will focus on mitigating quantization errors and improving robustness in cluttered environments.

Summary updated

Abstract

Real-time object localization on edge devices is fundamental for numerous applications, ranging from surveillance to industrial automation. Traditional frameworks, such as object detection, segmentation, and keypoint detection, struggle in resource-constrained environments, often resulting in substantial target omissions. To address these challenges, we introduce OCDet, a lightweight Object Center Detection framework optimized for edge devices with NPUs. OCDet predicts heatmaps representing object center probabilities and extracts center points through peak identification. Unlike prior methods using fixed Gaussian distribution, we introduce Generalized Centerness (GC) to generate ground truth heatmaps from bounding box annotations, providing finer spatial details without additional manual labeling. Built on NPU-friendly Semantic FPN with MobileNetV4 backbones, OCDet models are trained by our Balanced Continuous Focal Loss (BCFL), which alleviates data imbalance and focuses training on hard negative examples for probability regression tasks. Leveraging the novel Center Alignment Score (CAS) with Hungarian matching, we demonstrate that OCDet consistently outperforms YOLO11 in object center detection, achieving up to 23% higher CAS while requiring 42% fewer parameters, 34% less computation, and 64% lower NPU latency. When compared to keypoint detection frameworks, OCDet achieves substantial CAS improvements up to 186% using identical models. By integrating GC, BCFL, and CAS, OCDet establishes a new paradigm for efficient and robust object center detection on edge devices with NPUs. The code is released at https://github.com/chen-xin-94/ocdet.
BibTeX
@misc{xin2024ocdet,
  author = {Chen Xin and Thomas Motz and Andreas Hartel and Enkelejda Kasneci},
  title = {{OCDet: Object Center Detection via Bounding Box-Aware Heatmap Prediction on Edge Devices with NPUs}},
  year = {2024},
  eprint = {2411.15653},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.15653},
}
Figure