SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Qing Li<sup>1</sup> Huifang Feng<sup>2</sup> Kanle Shi<sup>3</sup> Yue Gao<sup>1</sup> Yi Fang<sup>4</sup> Yu-Shen Liu<sup>1*</sup> Zhizhong Han<sup>5</sup>
$^{1}$ School of Software, Tsinghua University, Beijing, China
$^{2}$ School of Informatics, Xiamen University, Xiamen, China
$^{3}$ Kuaishou Technology, Beijing, China
<sup>4</sup>Center for Artificial Intelligence and Robotics, New York University Abu Dhabi, Abu Dhabi, UAE
$^{5}$ Department of Computer Science, Wayne State University, Detroit, USA
{leoqli, gaoyue, liuyushen}@tsinghua.edu.cn fenghuifang@stu.xmu.edu.cn
yfang@nyu.edu h312h@wayne.edu
Normal estimation for 3D point clouds is a fundamental task in 3D geometry processing. The state-of-the-art methods rely on priors of fitting local surfaces learned from normal supervision. However, normal supervision in benchmarks comes from synthetic shapes and is usually not available from real scans, thereby limiting the learned priors of these methods. In addition, normal orientation consistency across shapes remains difficult to achieve without a separate post-processing procedure. To resolve these issues, we propose a novel method for estimating oriented normals directly from point clouds without using ground truth normals as supervision. We achieve this by introducing a new paradigm for learning neural gradient functions, which encourages the neural network to fit the input point clouds and yield unit-norm gradients at the points. Specifically, we introduce loss functions to facilitate query points to iteratively reach the moving targets and aggregate onto the approximated surface, thereby learning a global surface representation of the data. Meanwhile, we incorporate gradients into the surface approximation to measure the minimum signed deviation of queries, resulting in a consistent gradient field associated with the surface. These techniques lead to our deep unsupervised oriented normal estimator that is robust to noise, outliers and density variations. Our excellent results on widely used benchmarks demonstrate that our method can learn more accurate normals for both unoriented and oriented normal estimation tasks than the latest methods. The source code and pre-trained model are available at https://github.com/LeoQLi/NeuralGF.
Normal vectors are one of the local descriptors of point clouds and can offer additional geometric information for many downstream applications, such as denoising [70, 45, 44, 43], segmentation [63-65] and registration [62, 68]. Moreover, some computer vision tasks require the normals to have consistent orientations, i.e., oriented normals, such as graphics rendering [10, 21, 61] and surface reconstruction [26, 31-33]. Therefore, point cloud normal estimation has been an important research topic for a long time. However, progress in this area has plateaued for some time, until the recent introduction of deep learning. Currently, a growing body of work shows that performance improvements can be achieved using data-driven approaches [24, 8, 40, 39], and these learning-based methods often
Figure 1: (a) Existing surface fitting-based normal estimation methods can only produce unoriented normals (arrows) with inconsistent orientations. (b) Our method can estimate oriented normals (arrows) from unevenly sampled point clouds (black dots) with varying noise levels. The color of the arrow indicates the angle error compared to the ground truth.
give better results than traditional data-independent methods. However, they suffer from shortcomings in terms of robustness to various data and computational efficiency [36]. Besides, they usually rely on a large amount of labeled training data and network parameters to learn high-dimensional features. More importantly, the presence of varying noise levels, uneven sampling densities, and various complex geometries poses challenges for accurately estimating oriented normals from point clouds.
Most existing point cloud normal estimation methods aim to locally fit geometric surfaces and compute normals from the fitted surfaces. Recent surface fitting-based methods, such as DeepFit [8], AdaFit [86] and GraphFit [38], generalize the  $n$ -jet surface model [15] to learning-based frameworks that predict pointwise weights using deep neural networks. They obtain surface normals by solving the weighted least squares polynomial fitting problem. However, as shown in Fig. 1(a), their methods can not guarantee consistent orientations very well, since  $n$ -jet only fits a local surface, which is ambiguous for determining orientation. Furthermore, their methods need to construct local patches based on each query point for surface fitting. This results in the algorithm needing to traverse all patches in the point cloud, which is time-consuming. Most importantly, they rely on the priors learned from normal supervision to fit local surfaces, while such supervision is not always available.
Inspired by neural implicit representations [6, 7, 46, 49, 16], we introduce neural gradient functions (NeuralGF) to approximate the global surface representation and constrain the gradient during the approximation. Our method includes two basic principles: (1) We formulate the neural gradient learning as iteratively learning an implicit surface representation directly from the entire point cloud for global surface fitting. (2) We constrain the derived surface gradient vector to accurately describe the local distribution and make it consistent across iterations. Accordingly, we implement these two principles using the designed loss functions, resulting in a model that can provide accurate normals with consistent orientations from the entire point cloud (see Fig. 1(b)) through a single forward pass, and does not require ground truth labels or post-processing. Our method improves the state-of-the-art results while using much fewer parameters. To summarize, our main contributions include:
- Introducing a new paradigm of learning neural gradient functions, building on implicit geometric representations, for computing consistent gradients directly from raw data without ground truth.
- Implementing the paradigm with the losses designed to train neural networks to fit global surfaces and estimate oriented normals with consistent orientations in an end-to-end manner.
- Reporting the state-of-the-art performance for both unoriented and oriented normal estimation on point clouds with noise, density variations, and complex geometries.
Unoriented Normal Estimation. Point cloud normal estimation has been extensively studied over the past decades and widely used in many downstream applications. In general, most of these studies focus on estimating unoriented normals, i.e., finding more accurate perpendiculars of local surfaces. The Principle Component Analysis (PCA) [26] is the most commonly used algorithm that has been widely applied to various geometric processing tasks. Later, PCA variants [1, 59, 54, 35, 27], Voronoi
diagrams [3, 18, 2, 51] and Hough transform [11] have been proposed to improve the performance by preserving the shape details or sharp features. Moreover, some methods [37, 15, 23, 56, 4] are designed to fit complex surfaces by containing more neighboring points, such as moving least squares [37], truncated Taylor expansion ( $n$ -jet) [15] and spherical surface fitting [23]. These methods usually suffer from the parameters tuning, noise and outliers. To achieve more robust capability, they usually choose a larger neighborhood size but over-smooth the details. In recent years, deep learning-based normal estimation methods have been proposed and achieve great success. The regression-based methods predict normals from structured data or raw point clouds. Specifically, some methods [12, 66, 43] transform the 3D points into structured data, such as 2D grid representations. Inspired by PointNet [63], other methods [24, 83, 25, 9, 81, 82, 40, 41, 19, 39] focus on the direct regression for unstructured point clouds. In contrast to regressing the normal vectors directly, the surface fitting-based methods aim to train a neural network to predict pointwise weights, then the normals are solved through weighted plane fitting [36, 14] or weighted polynomial surface fitting [8, 86, 84, 80, 38] on local neighborhoods. Although these deep learning-based methods perform better than traditional data-independent methods, they require ground truth normals as supervision. In this work, we propose to use networks to estimate normals in an unsupervised manner.
Consistent Normal Orientation. Estimating normals with consistent orientations is also important and has been widely studied. The most popular and simplest way for normal orientation is based on local propagation, where the orientation of a seed point is diffused to the adjacent points by a Minimum Spanning Tree (MST). Most existing normal orientation approaches are based on this strategy, such as the pioneering work [26] and its improved methods [34, 69, 72, 67, 76, 29]. More recent work [53] integrates a neural network to learn oriented normals within a single local patch and introduces a dipole propagation strategy across the partitioned patches to achieve global consistency. These propagation-based approaches usually assume smoothness and suffer from local error propagation and the choice of neighborhood size. Since local consistency is usually not enough to achieve robust orientations across different inputs, some other methods determine the normal orientation by applying various volumetric representation techniques, such as signed distance functions [50, 55], variational formulations [71, 2, 28], visibility [30, 17], active contours [75], isvalue constraints [74] and winding-number field [77]. In addition to the above approaches, the most recent researches [24, 25, 73, 39] aim to learn oriented normals directly from point clouds in a data-driven manner. Similar to the unoriented normal estimation task, these deep learning-based methods perform better than traditional methods, but they require expensive ground truth as supervision. In contrast, our method achieves better performance in an unsupervised manner.
Neural Implicit Representation. Recent works [52, 57] propose to learn neural implicit representation from point clouds. Later, one class of methods [6, 7, 46, 60, 85, 47, 48] focuses on training neural networks to overfit a single point cloud by introducing newly designed priors. SAL [6] uses unsigned regression to find signed local minima, thereby producing useful implicit representations directly from raw 3D data. IGR [22] proposes an implicit geometric regularization to learn smooth zero level set surfaces. Neural-Pull [46] uses the signed distance to move a point along the gradient for finding its nearest path to the surface. SAP [60] proposes a differentiable Poisson solver to represent the surface as an oriented point cloud at the zero level set of an indicator function. These methods focus on accurately locating the position of the zero iso-surface of an implicit function to extract the shape surface. However, they ignore the constraints on the gradient of the function during optimizing the neural network. We know that the gradient determines the direction of function convergence, and the gradient of the iso-surface can be used as the normal of the extracted surface. If the gradient can be guided reasonably, the convergence process can be more robust and efficient, avoiding local extremum caused by noise or outliers. Motivated by this, we try to incorporate neural gradients into implicit function learning to achieve accurate oriented normals.
Preliminary. Neural implicit representations are widely used in representing 3D geometry and have achieved promising performance in surface reconstruction. Benefiting from the adaptability and approximation capabilities of deep neural networks [5], recent approaches [57, 22, 46, 48] use them to learn signed distance fields as a mapping from 3D coordinates  $\pmb{x}$  to signed distances. These approaches represent surfaces as zero level sets of implicit functions  $f$ , i.e.,  $\mathcal{S} = \{\pmb{x} \in \mathbb{R}^3 \mid f(\pmb{x}; \pmb{\theta}) = 0\}$ , where  $f: \mathbb{R}^3 \to \mathbb{R}$  is a network with parameter  $\pmb{\theta}$ , which is usually implemented as a multi-layer perceptron
i. Optimization
Figure 2: Overview of our method. The optimization is formulated as an iterative moving operation of the positions of point set  $\{Q,G\}$ , which is sampled from the raw data  $P$ , while the normal estimation is a single forward differentiation of the learned function  $f(x;\theta)$  using  $P$  as input. We move the input set  $\{Q,G\}$  through multiple steps using signed distance  $f_{i}$  and gradient  $\nabla f_{i}$  learned from  $f(x;\theta)$  to obtain the output set  $\{Q',G'\}$ . The gradient is initialized to point outside the surface.
ii. Normal Estimation
(MLP). If the function  $f$  is continuous and differentiable, the normal of a point  $p$  on the surface can be represented as  $\mathbf{n}_p = \nabla f(p) / \| \nabla f(p)\|$ , where  $\| \cdot \|$  denotes the euclidean  $L^2$ -norm and  $\nabla f(p)$  indicates the gradient at  $p$ , which can be obtained in the differentiation process of  $f$ . Specifically, there are some important properties of the gradient: (1) The maximum rate of change of the function  $f$  is defined by the magnitude of the gradient  $\| \nabla f\|$  and given by the direction of  $\nabla f$ . (2) The gradient vector  $\nabla f(p)$  is perpendicular to the level surface  $f(p) = 0$ .
Overview. We aim to train a neural network  $f$  with parameter  $\theta$  from input points  $\mathbf{x}$  to obtain the gradient  $\nabla f$  during the optimization of  $f$ . The optimization encourages  $f$  to fit  $\mathbf{x}$  and the gradient  $\nabla f$  to approach the normal of the implicit surface. We sample a query point set  $Q = \{q_j\}_{j=1}^{N_Q}$  and a surface point set  $G = \{g_j\}_{j=1}^{N_G}$  from raw point cloud  $P$ . Specifically,  $Q$  is sampled through some probability distribution  $\mathcal{D}$  from  $P$  [13, 46]. To explicitly indicate the underlying geometry, we sample the point set  $G \subset P$  that may be distorted by noise, and we verify that it can facilitate the learning of  $f$  (see Sec. 4.2). As shown in Fig. 2, our optimization pipeline is formulated as an iterative moving operation of the union of points  $Q$  and  $G$ , more specifically, with  $\mathcal{I}$  steps of position movement. During normal estimation, the entire point cloud  $P$  is fed into the network to derive the gradient embedded in the learned function. To learn the neural gradient function based on the implicit surface representation of  $f$ , we consider a loss of the form
$$
\mathcal {L} (\boldsymbol {\theta}) = \mathbb {E} _ {\boldsymbol {x} \sim \mathcal {D}} \left(\mathcal {T} \left(V (\boldsymbol {x}; \boldsymbol {\theta}), \mathcal {V} (\boldsymbol {x})\right) + \lambda \mathcal {T} \left(F (\boldsymbol {x}; \boldsymbol {\theta}), \mathcal {F} (\boldsymbol {x})\right)\right), \tag {1}
$$
where  $\mathcal{T}\colon \mathbb{R}\times \mathbb{R}\to \mathbb{R}$  is a differentiable similarity function, and we adopt the standard  $L^2$  (Euclidean) distance.  $V(\pmb {x};\pmb {\theta})$  and  $F(x;\theta)$  represent the approximated gradient vector and global surface representation of the underlying geometry  $P$ , respectively.  $\mathcal{V}(\pmb {x})$  and  $\mathcal{F}(\pmb {x})$  denote the corresponding measures, respectively. We will introduce them in the following two sections.  $\lambda >0$  is a weighting factor. The expectation  $\mathbb{E}$  is made for certain probability distribution  $\pmb {x}\sim \mathcal{D}$  in 3D space.
3.1 Learning Global Surface
The  $n$ -jet surface model represents a polynomial function that maps points  $(x,y) \in \mathbb{R}^2$  to their height  $z$  that is not in the tangent space over a local surface [8, 86, 38]. In contrast, we aim to learn an implicit global surface representation of the point cloud. The gradient indicates the direction in 3D space in which the signed distance from the surface increases the fastest, so moving a point along the gradient will find its nearest path to the surface. According to this property, we adopt a moving operation introduced in [46] to project a query point  $q$  to  $q'$ , and  $q' = q - f(q;\pmb{\theta}) \cdot \mathbf{n}_q$ ,  $\mathbf{n}_q = \nabla f(q;\pmb{\theta}) / \| \nabla f(q;\pmb{\theta}) \|$ . We also use  $\nabla f$  to denote the normalized gradient for simplification. For the point  $q \in Q$ , we expect the function  $f$  could provide correct signed distance  $f(q;\pmb{\theta})$  and gradient  $\nabla f(q;\pmb{\theta})$  that can be used to move  $q$  to the nearest point  $\hat{q}$  over the surface, and we minimize the error  $\| q' - \hat{q} \|$ . In this way, the function  $f$  can be used as an implicit representation of the underlying surface and the zero level set of  $f$  will be a valid manifold describing the point cloud. In
this work, the moving operation for input point set  $\{Q,G\}$  is formulated as
$$
\mathcal {L} _ {d} (\boldsymbol {\theta}) = \mathbb {E} _ {\boldsymbol {x} \sim \mathcal {D}} \mathcal {T} \left(F (\boldsymbol {x}; \boldsymbol {\theta}), \mathcal {F} (\boldsymbol {x})\right) = \left\| \left\{Q ^ {\prime}, G ^ {\prime} \right\} - \left\{\hat {Q}, \hat {G} \right\} \right\|, \quad \left\{Q ^ {\prime}, G ^ {\prime} \right\} = \left\{Q, G \right\} - \sum_ {i = 1} ^ {\mathcal {I}} f _ {i} \cdot \nabla f _ {i}, \tag {2}
$$
where  $\{Q', G'\}$  is the position of point set  $\{Q, G\}$  after moving in multiple steps  $\mathcal{I}$  (see Fig. 2), and  $\{\hat{Q}, \hat{G}\}$  is the target position.  $f_{i}$  represents the signed distance of points during the  $i$ -th position movement step. In practice, we find the nearest point of  $Q$  and  $G$  from the raw point cloud  $P$  as the target position. Different from previous works [46-48], we introduce a multi-step movement strategy to optimize the point set  $\{Q', G'\}$  to cover the surface instead of single-step movement. The insight of our design is that it is always difficult to directly reach the target in one step if some points are distributed far from the surface or distorted by noise. At this time, the optimization of the moving operation may go through many twists and turns to converge.
We optimize  $\mathcal{L}_d(\theta)$  in an end-to-end manner based on the moved point set  $\{Q', G'\}$ . For the points  $G \subset P$  in the first step, we expect them to be on the underlying surface. For the points  $\{Q', G'\}$  moved after the first step, we expect them to be as close to the underlying surface as possible. Hence, we leverage a regression loss term on the predicted distances  $f_i^Q$  and  $f_i^G$  of point set  $\{Q, G\}$ , i.e.,
$$
\mathcal {L} _ {r e g} (\boldsymbol {\theta}) = \left(f _ {1} ^ {G}\right) ^ {2} + \sum_ {i = 2} ^ {\mathcal {I}} \left(f _ {i}\right) ^ {2}, \text {a n d} f _ {i} = \left\{f _ {i} ^ {Q}, f _ {i} ^ {G} \right\}. \tag {3}
$$
3.2 Learning Consistent Gradient
A standard way for estimating unoriented point normals is to fit a plane to the local neighborhood  $\mathcal{N}(p, P)$  of each point  $p$  [37]. Given a neighborhood size  $K$ , we let  $\mathcal{V}(p) \in \mathbb{R}^{K \times 3}$  denote the set of centered coordinates of points in that neighborhood. Then the plane fitting is described as finding the least squares solution of
$$
\mathbf {n} _ {p} ^ {*} = \underset {\mathbf {n}: \| \mathbf {n} \| = 1} {\arg \min } \sum_ {k = 1} ^ {K} \| \mathbf {n} \cdot \mathcal {V} (p) _ {k} \| ^ {2}, \quad \text {a n d} \quad \mathcal {V} (p) _ {k} = p _ {k} - \frac {1}{K} \sum_ {l = 1} ^ {K} p _ {l}, \quad p _ {k}, p _ {l} \in \mathcal {N} (p, P). \tag {4}
$$
However, the inner product in the formula allows the distribution of normals on both sides of the surface (positive or negative orientations) to satisfy the optimization. Therefore, this approach cannot determine the normal orientation with respect to the surface, and a consistent orientation needs to be solved by post-processing, such as MST-based orientation propagation. In this work, we directly estimate oriented normals by incorporating neural gradients into implicit function learning [6, 7],
$$
\mathcal {L} _ {v} (\boldsymbol {\theta}) = \mathbb {E} _ {\boldsymbol {x} \sim \mathcal {D}} \mathcal {T} \left(V (\boldsymbol {x}; \boldsymbol {\theta}), \mathcal {V} (\boldsymbol {x})\right) = \| f (\boldsymbol {x}; \boldsymbol {\theta}) \cdot \mathbf {n} - \mathcal {V} (\boldsymbol {x}) \|, \tag {5}
$$
where  $\mathbf{n}$  is the unit gradient (normal) of each point on the surface. The above formula aims to measure the minimum deviation of each point from the underlying surface. Specifically, the gradient is perpendicular to the surface and the distance from the surface increases the fastest along the direction of the gradient. Therefore, we measure the deviation from  $P$  to  $Q$  by finding the optimal gradients. Generally, raw point clouds may contain noise and outliers that can severely degrade the accuracy of the surface approximation. To reduce the impact of inaccuracy in  $P$ , we introduce multi-scale neighborhood size  $\{K_s\}_{s=1}^{N_K}$  for  $\mathcal{V}(x)$  based on a statistical manner, that is
$$
\mathcal {V} _ {s} (q) = q - \frac {1}{K _ {s}} \sum_ {k = 1} ^ {K _ {s}} q _ {k}, \quad q _ {k} \in \mathcal {N} _ {K _ {s}} (q, P), \quad s = 1, \dots , N _ {K}, \tag {6}
$$
where  $\mathcal{N}_{K_s}(q,P)$  denotes the  $K_{s}$  nearest points of  $q\in Q$  in  $P$ .  $\mathcal{V}(q)$  is built as a vector from the averaged position  $\bar{\pmb{x}} = \sum_{k = 1}^{K_s}\mathcal{N}_{K_s}(q,P) / K_s$  on surface to query  $q$ . Then, the objective of Eq. (5) is turned into the aggregation of the error at each neighborhood size scale, i.e.,
$$
\mathcal {L} _ {v} (\boldsymbol {\theta}) = \mathbb {E} _ {\boldsymbol {x} \sim \mathcal {D}} \mathcal {T} \left(V (\boldsymbol {x}; \boldsymbol {\theta}), \mathcal {V} (\boldsymbol {x})\right) = \sum_ {s = 1} ^ {N _ {K}} \left\| f _ {i} ^ {Q} \cdot \nabla f _ {i} ^ {Q} - \mathcal {V} _ {s} (Q) \right\|, \tag {7}
$$
where  $i = 1,\dots ,\mathcal{I}$  is the number of steps. In practice, we only use  $f_{1}$  of the first step and its  $\nabla f_{1}$  to measure the deviation, since we want the optimization to converge as fast as possible, which also implies that the position  $Q^{\prime}$  after the first move step in Eq. (2) is as close to the surface as possible.
Figure 3: Visual comparison of oriented normals. We only show a partial cross-section of a closed shape for better visualization. The color of the arrow indicates RMSE, where purple means the same orientation as the ground truth and red means the opposite.