corner
Corner loss of the box-refinement heads (PointRCNN).
Classes:
-
CornerLossβModule form of
corner_loss.
CornerLoss [source] ΒΆ
Bases: Module
Module form of corner_loss.
Parameters:
-
beta(float, default:1.0) βSmooth-\(L_1\) transition point.
-
reduction(Literal['none', 'sum', 'mean'], default:'mean') β"none"returns the per-box loss,"sum"its sum,"mean"its mean.
Example
Methods:
-
forwardβCompute the corner loss between matched boxes
pred_boxes\((N, 7)\) andgt_boxes\((N, 7)\).
corner_loss [source] ΒΆ
Per-box mean smooth-\(L_1\) distance between the eight corners of two box sets, robust to the heading flip.
The corner regularization of PointRCNN: 3D Object Proposal Generation and Detection from Point Cloud (Shi et al., 2019): each predicted corner is compared with the matching corner of the ground-truth box and of that box rotated by \(\pi\), and the closer of the two distances is penalized, so a heading off by half a turn is not punished as a position error.
Parameters:
-
pred_boxes(Tensor) βPredicted boxes \((c_x, c_y, c_z, d_x, d_y, d_z, \theta)\), shape \((N, 7)\).
-
gt_boxes(Tensor) βMatched ground-truth boxes, shape \((N, 7)\).
-
beta(float, default:1.0) βSmooth-\(L_1\) transition point.
Returns:
-
TensorβThe per-box loss, shape \((N,)\).
Shape
- pred_boxes: \((N, 7)\)
- gt_boxes: \((N, 7)\)
- output: \((N,)\)