{'fraction_non_alphanumeric': 0.03411478719459437, 'fraction_numerical': 0.010217955584854353, 'mean_word_length': 4.686972820993439, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Product Manifold Filter: Non-Rigid Shape Correspondence via Kernel Density Estimation in the Product Space

Many algorithms for the computation of correspondences between deformable shapes rely on some variant of nearest neighbor matching in a descriptor space. Such are, for example, various point-wise correspondence recovery algorithms used as a post-processing stage in the functional correspondence framework. Such frequently used techniques implicitly make restrictive assumptions (e.g., near-isometry) on the considered shapes and in practice suffer from lack of accuracy and result in poor surjectivity. We propose an alternative recovery technique capable of guaranteeing a bijective correspondence and producing significantly higher accuracy and smoothness. Unlike other methods our approach does not depend on the assumption that the analyzed shapes are isometric. We derive the proposed method from the statistical framework of kernel density estimation and demonstrate its performance on several challenging deformable 3D shape matching datasets.


Introduction
Estimating the correspondence between 3D shapes is among the fundamental problems in computer vision, geometry processing and graphics with a wide spectrum of applications ranging from 3D scene understanding to texture mapping and animation. Of particular interest is the case in which the objects are allowed to deform non-rigidly. In this setting, research has mainly focused on minimizing a measure of distortion between the input shapes, reaching in recent years very high levels of accuracy [19]. However, point-wise accuracy often comes under restricting requirements (isometry assumption), or at the price of a lack of useful properties on the computed map, namely bijectivity (each point on either shape should have exactly one corresponding point on the other) and smoothness (nearby points should match to nearby points). Figure 1. Our method can be used to recover a dense, smooth, bijective correspondence between highly non-isometric shapes from minimal input information. In this example, we initialize our algorithm with just two hand-picked matches (red spheres on tail and front leg). Correspondence quality is visualized by transferring colors from horse to elephant via the recovered map.
In this paper, we introduce a novel method to recover smooth bijective maps between deformable shapes. Contrarily to previous approaches, we do not rely on the assumption that the two shapes are isometric. We phrase our matching problem by using the language of statistical inference, whereas the input to our algorithm is either 1) a sparse collection of point-wise matches (as few as two) which are used as landmark constraints to recover the complete map, or 2) a dense, noisy, possibly non-surjective and non-smooth map which is converted to a better map with higher accuracy and the aforementioned properties.

Related works
A traditional approach to correspondence problems is finding a point-wise matching between (a subset of) the points on two or more shapes. Minimum-distortion methods establish the matching by minimizing some structure distortion, which can include similarity of local features [33,14,8,44], geodesic [30,13,15] or diffusion distances [17], or a combination thereof [41].
Typically, the computational complexity of such meth-ods is high, and there have been several attempts to alleviate the computational complexity using hierarchical [37] or subsampling [40] methods. Several approaches formulate the correspondence problem as quadratic assignment and employ different relaxations thereof [42,25,35,2,15,20]. Algorithms in this category typically produce guaranteed bijective correspondences between a sparse set of points, or a dense correspondence suffering from poor surjectivity.
Embedding methods try to exploit some assumption on the correspondence (e.g. approximate isometry) in order to parametrize the correspondence problem with a few degrees of freedom. Elad and Kimmel [18] used multi-dimensional scaling to embed the geodesic metric of the matched shapes into a low-dimensional Euclidean space, where alignment of the resulting "canonical forms" is then performed by simple rigid matching (ICP) [16,10]. The works of [28,38] used the eigenfunctions of the Laplace-Beltrami operator as embedding coordinates and performed matching in the eigenspace. Lipman et al. [26,21,22] used conformal embeddings into disks and spheres to parametrize correspondences between homeomorphic surfaces as Möbius transformations. Despite their overall good performance, the majority of the matching procedures performed in the embedding space often produces noisy correspondences at fine scales, and suffers from poor surjectivity. More recently, in [6,5] the authors obtain a bijective correspondence by first computing compatible embeddings of the two shapes, and then aligning the embeddings through the use of sparse input correspondences. As opposed to point-wise correspondence methods, soft correspondence approaches assign a point on one shape to more than one point on the other. Several methods formulated soft correspondence as a masstransportation problem [29,39]. Ovsjanikov et al. [32] introduced the functional correspondence framework, modeling the correspondence as a linear operator between spaces of functions on two shapes, which has an efficient representation in the Laplacian eigenbases. This approach was extended in several follow-up works [34,23,3] . A point-wise map is typically recovered from a low-rank approximation of the functional correspondence by a matching procedure in the representation basis, which also suffers from poor surjectivity. A third class of matching methods formulates the correspondence problem as an optimization problem in the product space of the considered shapes. Windheuser et al. [43] seek for a two-dimensional minimal surface in the four-dimensional product space of the two input surfaces; this was later extended to a 2D-to-3D setting by Lähner et al. [24]. Making use of the graph structure of the considered shapes, the discretization leads to an integer linear program on the product mesh where desirable properties of the matching such as smoothness and surjectivity become linear constraints. However, the computational complexity is prohibitive even for a modestly-sized problem. Figure 2. The Product Manifold Filter (PMF) can be applied to a variety of problems that are aiming for bijective, smooth mappings between metric spaces. Here we map a 2D shape (contour) to a 3D shape. We initialize the PMF with two semantically meaningful matches (black spheres) and obtain a dense semantically meaningful bijection.

Main contributions
Many of the works mentioned above provide a matching that is neither bijective nor smooth. In some cases the matching is only available as a sparse set of points in the product space of the two shapes. We treat these matchings as corrupted versions of the latent correspondence and propose the Product Manifold Filter (PMF), a framework that increases the quality of the input mapping. We show that the considered filter leads to a linear assignment problem (LAP) guaranteeing bijective correspondence between the shapes. Despite the common wisdom, we demonstrate that the problem is efficiently solvable for relatively densely sampled shapes by means of the well-established auction algorithm [9] and a simple multi-scale approach. Unlike many of the previously mentioned techniques that assume the shapes to be (nearly) isometric, we allow them to undergo more general deformations ( Figure 1) or even have different dimensionality ( Figure 2).
Finally, we present a significant amount of empirical evidence that the proposed smoothing procedure consistently improves the quality of the input correspondence coming from different algorithms, including point-wise recovery methods from functional map pipelines. We also show the performance of PMF as an interpolator of sparse input correspondences.

A probabilistic framework
We consider a pair of three-dimensional shapes that are represented by their boundaries X and Y, two-dimensional manifolds embedded in R 3 and thus equipped with intrinsic metrics d X and d Y . Our goal is to find a semantically meaningful correspondence between X and Y. A correspondence is a diffeomorphism π : X → Y, i.e., a smooth mapping with a smooth inverse. We do not make any other assumptions such as isometry. The correspondence π can be represented as a two-dimensional manifold Π in the fourdimensional product space X ×Y: a pair (x, y) belongs to Π iff π(x) = y. We henceforth assume that the true correspon-dence π between X and Y and the manifold Π representing it are latent.
Let {(x k , y k )} k∈K ⊂ Π be a possibly sparse sample of the said manifold. For example, these can be pairs of corresponding points on X and Y computed using a feature detector followed by descriptor matching. In practice, we only have access to a noisy realization of these points, {(ξ k , η k )} k∈K , which we assume to ad- is an unnormalized Gaussian kernel with the parameter σ 2 .
Note that the density on the manifolds is expressed in terms of the intrinsic metrics d X and d Y .
Given the set of noisy corresponding points {(ξ k , η k )} k∈K as the input, our goal is to produce a faithful estimate of the correspondence π. We propose to estimate the latent manifold Π via kernel density estimation in the product space X × Y. To that end, we estimate the density function using the Parzen sum For every point x ∈ X , an estimate of π(x) is given by a point y maximizing f (x, y), One can further impose bijectivity ofπ : X → Y as a constrain, obtaining the following estimator of the entire map π = arg max π:X The process can be iterated as shown in the one-dimensional illustration in Figure 3. Procedures (2) or (3) have an area reduction effect on the manifold Π producing a more regular version thereof and thus a more regular correspondence π. We interpret (3) as a filter of correspondences and will henceforth refer to it a product manifold filter (PMF). While we defer the rigorous proof of the area reduction property to the extended version of the paper, in what follows, we illustrate it by a simple one-dimensional example.
One dimensional illustration. Let us consider a configuration of three points {x − , x, x + } and the corresponding noisy points {y − , y, y + } on a pair of one-dimensional manifolds X and Y like those depicted in Figure 3. We assume that the points are directly given in arclength parametrization, such that d X (x, |y − y − | = a, and d Y (y, y + ) = |y − y + | = a + δ. For convenience, we henceforth denote x = y = 0, x ± = ±b, y − = −a and y + = a + δ. In this setting, the onedimensional manifold Π 0 representing the input correspondence in the product space comprises two segments connecting (−b, −a), (0, 0), and (b, a + δ), and its length is over the valuesŷ for the point y. First, we observe that since K(b) > 0, the global maximum of h(ŷ) has to be around y = 0. Forŷ = 0 and δ = 0, one has and Since K (0) = 0 and K (−a) = −K (a), the first derivative vanishes, while the fact that K (0) < 0 and K (−a) = K (a) implies thatŷ = 0 is the maximum of h. Next, we perform perturbation analysis of the above maximizer by invoking the first-order Taylor expansion of h around (δ,ŷ) = (0, 0): Demanding equality to zero yields the maximizer of the perturbed problem For a < σ √ 2 the ratio in the denominator is positive and consequently c ∈ (0, 1 2 ). The length of the estimated manifoldΠ can be obtained using a series of first-order Taylor approximations, which manifests the length reducing effect of the PMF.  (1) in the product space of the two shapes X and Y. Dark areas correspond to higher density. According to (3), consistently maximizing f (x, ·) gives a bijective and smoothed matching (red curve in product space) which is used to derive the density estimate in the next iteration. Bottom: matching visualized via color transfer. Shapes are parametrized counter-clockwise with the origin of the product space corresponding to the noses of horse and dog. Note the circular boundary conditions of the product space.

Discretization
In what follows, we consider a discretization of problem (3). We assume the shape X to be discretized at n points {x i } n i=1 and the pairwise geodesic distances are stored in the matrix D X ∈ R n×n . Similarly, the shape Y is discretized as {y i } n i=1 and its pairwise distance matrix is denoted by D Y ∈ R n×n . Given a (possibly sparse) collection of input correspondences {(ξ k , η k )} m k=1 the unnormalized kernel density estimation can be written as an n × n matrix with the matrices K X ∈ R n×m and K Y ∈ R n×m given by The objective in (3) thus becomes with P ∈ {0, 1} n×n being a permutation matrix representing a bijection between {x i } n i=1 and {y i } n i=1 . At some points it will be convenient to use the vector representation p ∈ {1, . . . , n} n of P. Estimating the bijective correspondence as in (3) thus turns out to be a linear assignment problem (LAP) of the formP where the optimization is performed over the space of all n × n permutation matrices.

Multiscale
While linear assignment problems like (10) can be solved in polynomial time, the memory consumption is quadratic in the vertex set size n. To alleviate this burden, we propose a multi-scale technique based on the assumption of local regularity of the manifold Π.
Given two shapes discretized at n points each, we perform farthest point sampling to obtain a hierarchy of p multiscale representations consisting of n 1 < n 2 < . . . < n p = n points. Each of the samplings comes with a sequence of sampling radii, r X 1 > r X 2 > . . . > r X p and r Y 1 > r Y 2 > . . . > r Y p , respectively. For sufficiently large shapes, the n × n pairwise distance matrices D X and D Y can be no more stored entirely in memory. We follow [4,27] and store only the projection of the latter matrices on the first r eigenfunctions of the Laplacian resulting in an n × r matrix. The original distances are reconstructed on-demand, with negligible error as shown in [1,27].
We recursively apply a variant of the PMF to the sparse set of input matches obtained by the coarser scale: Figure 4. Our method finds smooth bijective maps between nonisometric shapes even when one single match is given as input (marked as small red spheres). Note that the map remains smooth even if the initial match is wrong (rightmost column). where The weighting matrix W ∈ {0, 1} (n 2 i+1 ×n 2 i ) assures that the image of a point x s being in the vicinity of x i k is constrained to be mapped to a point in the vicinity of p(k) and vice versa (i.e., the matching and its inverse are supposed to be smooth): This construction leads to a sparse payoff matrix corresponding to a smaller space of feasible permutations, so that the corresponding LAP can be solved efficiently. Note the factor 2 in (14). Since we cannot guarantee the Voronoi cells on the two shapes to have the same number of points and want to be able to remove errors from the coarser scale, we permit moving a point to an adjacent Voronoi cell.

Experiments
While our method can be applied to a variety of problems aiming at bijective and smooth mappings between metric spaces (see Figure 2 for an extreme case), here we focus on the recovery of a correspondence between nonrigid and possibly non-isometric 3D shapes. We show the performance of our method in two very different scenarios, namely refinement of noisy dense correspondence, and completion of sparse correspondence. We additionally demonstrate the performance of our multi-scale technique by recovering bijective correspondences between high resolution shapes.

Recovery from sparse correspondences
In our first set of experiments we consider a scenario in which the input shapes come with a (possibly very sparse) collection of initial matches. These, in turn, can be obtained by a sparse non-rigid matching technique such as [35] or be hand-picked, depending on the application. In these experiments we compare PMF with the Tutte embedding approach recently introduced in [5]. Similarly to PMF, this approach produces guaranteed bijective and smooth maps starting from a sparse set of point-wise matches; to our knowledge, this method represents the state-of-the-art for this class of problems.
The results of this comparison are shown in Figure 5. The input matches were obtained by mapping farthest point samples on a reference shape via the ground-truth correspondence to the target shape, and are visualized by transferring a texture from reference to target via the recovered dense map. As we can read from the plots, our approach yields maps of better quality when fewer than ten matches are provided as the input, and maps of comparable quality when more matches are available. It is important to note that while our method still produces meaningful solutions when just one or two matches are given as the input (see Figures 1, 4), the approach of [5] has the theoretical minimum of three matches; furthermore, the latter approach gives different solutions depending on the specific ordering of the inputs, while our method is invariant to their permutations.

Recovery from noisy input
In this set of experiments we assume to be given a lowrank approximation of the latent correspondence P in terms of a functional map where Φ, Ψ ∈ R n×r are truncated orthonormal bases on X and Y. We refer the reader to the original paper [32] for details and allow ourselves to condense its ideas to the above equation. While a plurality of methods for finding C have been proposed in the last years, there currently exist only three approaches to recover a pointwise correspondence matrix P from it. In [32] the authors proposed to recover a pointwise correspondence between X and Y by solving the nearestneighbor problem (NN) alternated with an orthogonality-enforcing refinment of C (ICP). A variant is its bijective version (Bij. NN)  Figure 5. Comparison between our method and the method of [5] at increasing number of input matches (reported on top). Both methods produce smooth, guaranteed bijective solutions; our method requires little computational effort (a few minutes as opposed to ∼1 hour for [5]), and yields in comparison more accurate solutions when fed with a very sparse input.
The orthogonal refinement of (16) assumes the underlying map to be area-preserving [32], and is therefore bound to fail in case the two shapes are non-isometric. Rodolà et al. [36] proposed to consider the non-rigid counterpart for a given C: Here D KL denotes the Kullback-Leibler divergence between probability distributions, Ω is a low-pass operator promoting smooth velocity vectors, and λ > 0 controls the regularity of the assignment. The problem is then solved via expectation-maximization by the coherent point drift algorithm (CPD) [31]. We construct the low-rank functional map using the known groundtruth correspondences between the shapes. Since this is supposed to be the ideal input for all the competing methods, we abandon the refinment step in (16). Correspondences returned by the other methods are treated as noisy realizations of the latent bijection and are recovered via PMF with σ 2 set to 2% of the target shape area.
We show quantitative comparisons on 71 pairs from the SCAPE dataset [7] (near isometric, 1K vertices) and 100 pairs from the FAUST dataset [11] (including inter-class pairs, 7K vertices). In Figures 10 and 8 we compare the correspondence accuracy, while in Figure 11 we visualize how lack of smoothness, bijectivity and accuracy affect texture transfer.
The accuracy of all input-matchings is increased by applying the product manifold filter. To our knowledge the matchings obtained by the PMF are the most accurate ones that can be recovered from this type of low-rank approximation. While linear assignment problems are known to be time demanding to solve for larger numbers of variables, the most dramatic increase of run time occurs when applying the coherent point drift algorithm (see Table 1). Memory Figure 6. Result of our method on two cat shapes from TOSCA [12]. This high resolution shape has 27894 vertices, making it infeasible to store the entire pairwise distance matrix in memory. Our multi-scale approach recovered a smooth matching from only 20 sparse correspondences given as the input using five hierarchical scales as detailed in Section 2.2. consumption and run times however limit the direct applicability of the PDM.

Recovering high-resolution correspondences using multiscale
In this set of experiments we demonstrate how the PMF together with the multiscale method described in 2.2 can recover very accurate matchings on shapes being sampled at high resolution. Figure 6 shows a dense bijective matching between two shapes sampled at n = 27894 points each. At each of the six scales n i ∈ {10 3 , 2 × 10 3 , 4 × 10 3 , 8 × 10 3 , 1.6 × 10 4 , n} the constrained LAP (11) was solved. Figure 7 shows the improvement of correspondence accuracy at finer scales. By using the weighting functions we force points to stay close to their nearest neighbor in the coarser sampling and thus can guarantee to approximately keep the accuracy from the coarser scale. Solving the constrained LAP at the finest resolution took less then 9 minutes. Calculating the kernel density matrices (6) for all  scales took less than 40 minutes. Another test was performed on pairs of shapes from the FAUST dataset. As Figure 9 shows, the correspondences obtained using a four-scale scheme are comparable in accuracy to the solution of a single-scale scheme. However, the runtime of the multi-scale approach is significantly lower. Calculating the kernel density matrices (6) for all scales took about 4 minutes, while solving the LAPs at all scales took around 18 seconds.

Discussion and conclusion
We considered the problem of bijective correspondence recovery by means of filtering a given set of matches coming from any of the existing algorithms (including those not guaranteeing bijectivity, or producing sparse correspondences). Viewing correspondence computation as a kernel density estimation problem in the product space, we introduced the product manifold filter that leads to smooth cor-  respondences, with the additional constraint of bijectivity embodied through an LAP. We believe that statistical tools that have been heavily used in other domains of science and engineering might be very useful in shape analysis, and invite the community to further explore this direction. Of special interest is the possibility to lift the product space to higher dimensions encoding local similarity of points on the two shapes, for instance by using descriptors. The way the kernel density estimator is constructed does not restrict the samples per shape to be distinct. Together with the use of weighting factors this alllows to directly work with softmaps as inputs. Finally, we believe that denoising the correspondence manifold in the product space is a useful perspective applicable to different problems in computer vision where smooth correspondences are desired, such as optical flow.  (Table 1). Even better results are achieved under affordable runtimes when initializing PMF estimator with the result of bijective NN (center).
1% 3% 5% 7% ×diam NN NN+PMF CPD CPD+PMF NN NN+PMF CPD CPD+PMF Figure 11. Qualitative comparison of methods for pointwise correspondence recovery from a functional map. Current methods such as Nearest Neighbors (NN) and coherent point drift (CPD) suffer from bad accuracy and lack of surjectivity. Applying the proposed estimation to either of them gives a guaranteed bijective matching with high accuracy and improved smoothness. Left: We visualize the accuracy of the methods by transferring texture from the source shape X to the target shape Y. Neither Nearest Neighbors nor CPD produce bijective mappings. The lack of surjectivity is visualized by assigning a fixed color (green) to not-hit points. Right: The geodesic error (distance between groundtruth and recovered match, relative to the shape diameter) induced by the matching is visualized on the target shape Y.