Computer Vision Lab Models CenterNet (Objects as Points)

CenterNet (Objects as Points)

Keypoint heatmap of object centres + size and offset heads

Knowledge card: predicts a heatmap of object centres for each class, then reads the size and offset at each peak; so no anchors and no NMS. The same idea extends to 3D detection and pose estimation.

Object detectionKnowledge card

ArchitectureKeypoint heatmap of object centres + size and offset heads
TaskObject detection
Training dataCOCO 2017
the number of parametersDepends on the backbone
FrameworkPyTorch
File size—
LicenceMIT
Where it runsKnowledge card only
Official sourcegithub.com

Published metrics (from the official source, not measured by this site)

MetricValueEvaluation dataSource
AP (no aug / flip / multi-scale)37.4 / 39.2 / 41.7COCO val2017, DLA-34Source
AP (no aug / flip / multi-scale)40.3 / 42.2 / 45.1COCO val2017, Hourglass-104Source

Architecture diagram

CenterNet (Objects as Points) architecture diagramInput512×512×3Backbone: DLA-34 / Hourglass-104 / ResNetup-sampled to stride 4Feature map128×128×64Heatmap head128×128×C (focal loss)Offset head128×128×2Size head128×128×2 (w, h)Peak extraction3×3 max-pool, top-100 (no NMS)Boxescentre + offset ± size/2
CenterNet («Objects as Points», Zhou et al. 2019): represents each object by its centre point; a backbone with output stride 4 and three heads (a heatmap per class, offset, size), and peak extraction with 3×3 max pooling instead of NMS.
  • Input / output
  • Composite block
  • Memory / intermediate features
  • Output head
  • Operation (add, multiply, merge)

Detailed model explanation

Idea and intuition

CenterNet («Objects as Points») represents each object by a single point, the centre of its box. The network predicts a heatmap per class whose local peaks are the object centres, then reads at each peak the box size and a small offset to correct the rounding error. Taking the local peaks (with 3×3 max pooling) is thus enough instead of NMS, and the same framework extends to pose, depth and 3D dimension estimation by adding further heads at the centre.

Components

  • A backbone that outputs a map at 1/4 resolution (Hourglass-104, DLA-34 or ResNet with upsampling layers).
  • Heatmap head \hat Y\in[0,1]^{\frac W4\times\frac H4\times C}.
  • Size head \hat S\in\mathbb R^{\frac W4\times\frac H4\times 2} and offset head \hat O.

Mathematical formulation

The ground truth is drawn with a Gaussian kernel around each centre, and the map is trained with a modified pixel-wise focal loss:

\mathcal L_k = -\frac1N\sum_{xyc}\begin{cases}(1-\hat Y_{xyc})^{\alpha}\log\hat Y_{xyc} & Y_{xyc}=1\\ (1-Y_{xyc})^{\beta}\,\hat Y_{xyc}^{\alpha}\log(1-\hat Y_{xyc}) & \text{otherwise}\end{cases}

with \alpha=2,\ \beta=4 in the paper. The box is decoded at peak (\hat x,\hat y) by adding the offset then subtracting and adding half the size.

Performance

According to the official repository on COCO: DLA-34 reaches 37.4 / 39.2 / 41.7 AP (no augmentation / with flip / multi-scale), and Hourglass-104 reaches 40.3 / 42.2 / 45.1.

Strengths and limitations

  • Strength: great simplicity and flexibility for extending tasks.
  • Strength: no anchors and no traditional NMS.
  • Limitation: two objects of the same class with the same centre after downsampling collide (rare in COCO according to the paper).
  • Limitation: the 1/4 resolution costs memory on large images.

Uses

Fast detection, monocular 3D detection, tracking (CenterTrack).

Runtime requirements

—

How to load

Not loaded in the lab (knowledge card).

References

  1. X. Zhou, D. Wang, P. Krähenbühl (2019).Objects as Points. arXiv:1904.07850. doi:10.48550/arXiv.1904.07850

Related algorithms