A Near-Linear Time Algorithm for the Chamfer Distance

For any two point sets of size up to , the Chamfer distance from to is defined as , where is the underlying distance measure (e.g., the Euclidean or Manhattan distance). The Chamfer distance is a popular measure of dissimilarity between point clouds, used in many machine learning, computer vision, and graphics applications, and admits a straightforward -time brute force algorithm. Further, the Chamfer distance is often used as a proxy for the more computationally demanding Earth-Mover (Optimal Transport) Distance. However, the \emph{quadratic} dependence on in the running time makes the naive approach intractable for large datasets. We overcome this bottleneck and present the first -approximate algorithm for estimating the Chamfer distance with a near-linear running time. Specifically, our algorithm runs in time and is implementable. Our experiments demonstrate that it is both accurate and fast on large high-dimensional datasets. We believe that our algorithm will open new avenues for analyzing large high-dimensional point clouds. We also give evidence that if the goal is to \emph{report} a -approximate mapping from to (as opposed to just its value), then any sub-quadratic time algorithm is unlikely to exist.
View on arXiv