ChamferDistance<T>

Models & Types · AiDotNet.Metrics

Chamfer Distance metric for 3D point cloud comparison.

How It Works

Chamfer Distance measures the average squared distance from each point in one set to its nearest neighbor in the other set, computed bidirectionally. CD(X,Y) = (1/|X|)Σ_x min_y ||x-y||² + (1/|Y|)Σ_y min_x ||y-x||²

Lower Chamfer Distance indicates better point cloud similarity.

Usage in 3D AI:

  • Point cloud completion evaluation
  • 3D reconstruction quality
  • Shape generation evaluation
  • NeRF/Gaussian Splatting geometry quality

Constructors

Constructor Summary
ChamferDistance(bool squared) Initializes a new instance of the Chamfer Distance metric.

Methods

Method Summary
T Compute(Tensor<T> pointsA, Tensor<T> pointsB) Computes Chamfer Distance between two point clouds.
T ComputeOneWay(Tensor<T> source, Tensor<T> target) Computes one-way Chamfer Distance from source to target.
T[] ComputeBatch(Tensor<T> batchA, Tensor<T> batchB) Computes Chamfer Distance for batched point clouds.