wikillm

Concept · 3 papers · updated 2026-10-25

Chamfer distance

Chamfer distance measures how far two unordered point sets are from each other by averaging nearest-neighbour distances. Covers the squared-L2 form used for training and evaluation (GRNet), a density-aware variant for measuring deformation (SoGraB), a plain form used to score generated objects (OLiDM), an L1 appendix variant, and a grid loss that is not Chamfer.

point-cloudloss-functionevaluation-metricshape-completiongraspinglidar

Markdown5 min read

AI-compiled overview, updated 2026-10-25, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

Overview

A point cloud has no order, so its points cannot be compared one by one with the points of another cloud. Chamfer distance avoids the matching problem: each point is paired with its nearest neighbour in the other set, and the squared distances are averaged 2006.03761 §4.2 eq. 9. The measure is taken in both directions, from the prediction to the ground truth and back 2006.03761 §4.2.

Three papers use the measure, each in a different role. GRNet uses it to train and to evaluate point-cloud completion 2006.03761 §4.2. Its introduction also argues that networks trained with Chamfer distance tend to output a mean shape 2006.03761 §1 §3.7. SoGraB uses a density-aware variant to measure how much a grasped object deforms 2411.19408 §3.1 eq. 2. OLiDM reports plain Chamfer distance as a quality score for generated foreground objects 2412.17226 tab. 2 §4.1.

Variants

Squared-L2 Chamfer distance (both directions)

The form in GRNet's evaluation section. Each direction takes the mean squared distance to the nearest point, and the paper reports the result scaled by 10^4 2006.03761 §4.2 tab. 1. The paper does not state how the two directions are combined into one number 2006.03761 §4.2. Results on ShapeNet and Completion3D are reported in this form. Card: GRNet: Gridding Residual Network for Dense Point Cloud Completion.

Training with two Chamfer terms

The paper's text does not state a full training objective 2006.03761 §3.7. The released training code uses a sum of two Chamfer distances, one for the coarse cloud and one for the dense cloud, each against the ground truth. The GRNet card records this under Paper vs code: GRNet.

Density-aware Chamfer distance (deformation)

SoGraB measures the deformation of a soft object by comparing its point cloud before and after a grasp 2411.19408 §3.1. The paper rejects plain Chamfer and Earth Mover's distance for this use 2411.19408 §3.1. Its variant adds a damping term. For each point, the term is one minus an exponential of the distance to its nearest neighbour, divided by how many points chose that neighbour. The two directions are averaged [arxiv:2411.19408 eq. 2]. The sensitivity alpha of the exponential is not given in the paper 2411.19408 §3.1. The paper aligns the two clouds with ICP first, from a start estimate taken from the robot's kinematics 2411.19408 §3.2. Card: SoGraB: A Visual Method for Soft Grasping Benchmarking and Evaluation.

Plain Chamfer distance as a quality score (generated objects)

OLiDM reports Chamfer distance, labelled CD, as one of three measures of generated foreground objects. Lower is better 2412.17226 tab. 2. The paper says CD is used to evaluate the quality of foreground objects 2412.17226 §4.1. The paper's text does not give the point count or the scale used for CD 2412.17226 §4.1. Card: OLiDM: Object-aware LiDAR Diffusion Models for Autonomous Driving.

L1-norm Chamfer distance (appendix)

The appendix reports a Chamfer variant labelled as using the L1 norm, with its own table of values 2006.03761 app. B tab. 8. Its values are on a different scale, x10^3 rather than x10^4 tab. 8. The released repository does not implement this metric 2006.03761 app. B.

Grid-based Gridding loss (not Chamfer)

The paper also defines a Gridding loss: an L1 distance between two occupancy grids, built from the predicted and true clouds 2006.03761 §3.7 eq. 8. It is a different measure, so it is listed here only to separate it from the Chamfer family. The paper credits it with recovering finer detail 2006.03761 §1. The released training loop does not call it, so the paper's ablation with and without it cannot be reproduced from that code 2006.03761 tab. 7.

When to use which

SituationUseWhy
Points are unordered and counts may differ between prediction and targetSquared-L2 Chamfer, both directionsThe nearest-neighbour pairing needs no correspondence and works with different point counts 2006.03761 §4.2 eq. 9
Comparing with published numbersThe same variant and scale the baseline usedThe GRNet tables use squared-L2 at 10^4 tab. 1; the L1 numbers are in a separate appendix table at 10^3 tab. 8
Training a coarse-to-fine completion networkChamfer on both the coarse and the dense outputThis is what the released code does; the paper's text does not give the objective 2006.03761 §3.7
Output should keep fine detail and avoid a mean shapeChamfer alone may not be enough; the paper proposes a grid lossThe paper's argument is in 2006.03761 §1 §3.7. Its ablation supports the grid loss tab. 7, but the code does not reproduce that ablation
Measuring how much a soft object deforms between two scansDensity-aware Chamfer, after alignmentThe damping term keeps differences in point density from dominating 2411.19408 eq. 2; SoGraB's score is built on it 2411.19408 §3.1
Scoring generated objects against reference objects, alongside other measuresPlain Chamfer, lower is betterOLiDM uses it this way next to JSD and a semantic score 2412.17226 tab. 2. Scale and point count are not given, so compare only within one protocol
Comparing scores across datasetsMatch the point count and split of the benchmarkGRNet evaluates on ShapeNet at 16,384 ground-truth points 2006.03761 §4.1 and on Completion3D with 2,048-point outputs §4.5 tab. 3

Implementation sketch

Squared-L2 Chamfer distance, both directions. GRNet does not state how the two directional means are combined; the sum is shown here as a choice. SoGraB averages them instead 2411.19408 eq. 2.

Pseudocode
# Squared-L2 Chamfer distance  [arxiv:2006.03761 §4.2] [eq. 9]
# Inputs: pred (N, 3), gt (M, 3); outputs a scalar

def chamfer_l2(pred, gt):
    # Squared distance between every predicted and every true point
    d = pairwise_sq_dist(pred, gt)            # (N, M)
    # Nearest true point for each prediction, averaged over predictions
    pred_to_gt = d.min(dim=1).mean()
    # Nearest prediction for each true point, averaged over true points
    gt_to_pred = d.min(dim=0).mean()
    # Combination of the two directions is not stated by GRNet; sum is shown
    return pred_to_gt + gt_to_pred

The L1 variant replaces the squared distance with an absolute distance 2006.03761 app. B. The density-aware variant changes the per-point term to the damped exponential described above 2411.19408 eq. 2. The grid-based loss needs a voxelised version of both clouds and is not a point-set distance 2006.03761 §3.7 eq. 8.

Contradictions

Inside GRNet, the text does not give a training objective 2006.03761 §3.7, while the released code trains on a sum of two Chamfer terms. The paper does not say which training loop produced its grid-loss ablation [arxiv:2006.03761 tab. 7]. Scale also differs: the paper tables use 10^4 for squared-L2 Chamfer 2006.03761 tab. 1, and the code logs the same quantity at 10^3. Card for all of these: GRNet.

Across papers, the two directions are combined differently. GRNet does not state a combination 2006.03761 §4.2. SoGraB averages the two directions 2411.19408 eq. 2. Numbers from the two are not directly comparable.

SoGraB's sensitivity alpha has no value in the paper 2411.19408 §3.1. Its released code sets one value, while the code's own comment and default give another. Which value produced the paper's scores is not stated. Card: SoGraB.

OLiDM reports CD without giving its scale or point count 2412.17226 §4.1. Its linked repository holds only the project website, so the CD values cannot be checked against code. Card: OLiDM.

Papers

Source and license

Compiled from the papers listed on this page, all published under CC BY, CC BY-SA or CC0, with citations. See each paper's page for its authors and license.