{'fraction_non_alphanumeric': 0.0315706108931207, 'fraction_numerical': 0.012707440872601606, 'mean_word_length': 4.9974093264248705, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SG-NN: Sparse Generative Neural Networks for Self-Supervised Scene Completion of RGB-D Scans

We present a novel approach that converts partial and noisy RGB-D scans into high-quality 3D scene reconstructions by inferring unobserved scene geometry. Our approach is fully self-supervised and can hence be trained solely on incomplete, real-world scans. To achieve, self-supervision, we remove frames from a given (incomplete) 3D scan in order to make it even more incomplete; self-supervision is then formulated by correlating the two levels of partialness of the same scan while masking out regions that have never been observed. Through generalization across a large training set, we can then predict 3D scene completions even without seeing any 3D scan of entirely complete geometry. Combined with a new 3D sparse generative convolutional neural network architecture, our method is able to predict highly detailed surfaces in a coarse-to-fine hierarchical fashion that outperform existing state-of-the-art methods by a significant margin in terms of reconstruction quality.


Introduction
In recent years, we have seen incredible progress on RGB-D reconstruction of indoor environments using commodity RGB-D sensors such as the Microsoft Kinect, Google Tango, or Intel RealSense [22,16,23,34,5,10]. However, despite remarkable achievements in RGB-D tracking and reconstruction quality, a fundamental challenge still remains -the incomplete nature of resulting 3D scans caused by inherent occlusions due to the physical limitations of the scanning process; i.e., even in a careful scanning session it is inevitable that some regions of a 3D scene remain unobserved. This unfortunately renders the resulting reconstructions unsuitable for many applications, not only those that require quality 3D content, such as video games or AR/VR, but also robotics where a completed 3D map significantly facilitates tasks such as grasping or querying 3D objects in a 3D environment.
In order to overcome the incomplete and partial nature of 3D reconstructions, various geometric inpainting techniques have been proposed, for instance, surface interpolation based on the Poisson equation [17,18] or CAD shape-fitting techniques [1,2,8]. A very recent direction leverages generative deep neural networks, often focusing volumetric representations for shapes [11] or entire scenes [29,12]. These techniques show great promise since they can learn generalized patterns in a large variety of environments; however, existing data-driven scene completion methods rely on supervised training, requiring fully complete ground truth 3D models, thus depending on large-scale synthetic datasets such as ShapeNet [4] or SUNCG [29]. As a result, although we have seen impressive results from these approaches on synthetic test sets, domain transfer and application to real-world 3D scans remains a major limitation.
In order to address the shortcomings of supervised learning techniques for scan completion, we propose a new selfsupervised completion formulation that can be trained only on (partial) real-world data. Our main idea is to learn to generate more complete 3D models from less complete data, while masking out any unknown regions; that is, from an existing RGB-D scan, we use the scan as the target and remove frames to obtain a more incomplete input. In the loss function, we can now correlate the difference in partialness between the two scans, and constrain the network to predict the delta while masking out unobserved areas. Although there is no single training sample which contains a fullycomplete 3D reconstruction, we show that our network can nonetheless generalize to predict high levels of completeness through a combined aggregation of patterns across the entire training set. This way, our approach can be trained without requiring any fully-complete ground truth counterparts that would make generalization through a syntheticto-real domain gap challenging.
Furthermore, we propose a new sparse generative neural network architecture that can predict high-resolution geometry in a fully-convolutional fashion. For training, we propose a progressively growing network architecture trained in coarse-to-fine fashion; i.e., we first predict the 3D scene at a low resolution, and then continue increasing the surface resolution through the training process. We show that our self-supervised, sparse generative approach can outperform state-of-the-art fully-supervised methods, despite their access to much larger quantities of synthetic 3D data.
We present the following main contributions: • A self-supervised approach for scene completion, enabling training solely on incomplete, real-world scan data while predicting geometry more complete than any seen during training, by leveraging common patterns in the deltas of incompleteness.
• A generative formulation for sparse convolutions to produce a sparse truncated signed distance function representation at high resolution: we formulate this hierarchically to progressively generate a 3D scene in end-to-end fashion

Related Work
RGB-D Reconstruction Scanning and reconstructing 3D surfaces has a long history across several research communities. With the increase in availability of commodity range sensors, capturing and reconstructing 3D scenes has become a vital area of research. One seminal technique in this context is the volumetric fusion approach proposed by Curless and Levoy [7], operating on truncated signed distance fields to produce a surface reconstruction. It has been adopted by many state-of-the-art real-time reconstruction methods, from KinectFusion [22,16] to VoxelHashing [23] and BundleFusion [10], as well as state-of-the-art offline reconstruction approaches [5]. These methods have produced impressive results in tracking and scalability of 3D reconstruction from commodity range sensors. However, a significant limitation that still remains is the partial nature of 3D scanning; i.e., a perfect scan is usually not possible due to occlusions and unobserved regions and thus, the resulting 3D representation cannot reach the quality of manually created 3D assets.
Deep Learning on 3D Scans With recent advances in deep learning and the improved availability of large-scale 3D scan datasets such as ScanNet [9] or Matterport [3], learned approaches on 3D data can be used for a variety of tasks like classification, segmentation, or completion.
Many current methods make use of convolutional operators that have been shown to work well on 2D data. When extended into 3D, they operate on regular grid representations such as distance fields [11] or occupancy grids [20]. Since dense volumetric grids can come with high computational and memory costs, several recent approaches have leveraged the sparsity of the 3D data for discriminative 3D tasks. PointNet [25,26] introduced a deep network architecture for learning on point cloud data for semantic segmentation and classification tasks. Octreebased approaches have also been developed [28,31,32] that have been shown to be very memory efficient; however, generative tasks involving large, varying-sized environments seems challenging and octree generation has only been shown for single ShapeNet-style objects [27,30]. Another option leveraging the sparsity of 3D geometric data is through sparse convolutions [14,13,6], which have seen success in discriminative tasks such as semantic segmentation, but not in the context of generative 3D modeling tasks, where the overall structure of the scene is unknown.
Shape and Scene Completion Completing 3D scans has been well-studied in geometry processing. Traditional methods, such as Poisson Surface Reconstruction [17,18], locally optimize for a surface to fit to observed points, and work well for small missing regions. Recently, various deep learning-based approaches have been developed with greater capacity for learning global structures of shapes, enabling compelling completion of larger missing regions in scans of objects [35,11,15,33,24]. Larger-scale completion of scans has been seen with SSCNet [29], operating on a depth image of a scene, and ScanComplete [12], which demonstrated scene completion on room-and buildling floor-scale scans. However, both these approaches operate on dense volumetric grids, significantly limiting their output resolutions. Moreover, these approaches are fully supervised with complete 3D scene data, requiring training on synthetic 3D scene data (where complete ground truth is known), in order to complete real-world scans.
An alternative approach for shape completion could through leveraging a single implict latent space, as in DeepSDF [24] or Occupancy Networks [21]; however, it still remains a challenge as to how to scale a single latent space to represent large, varying-sized environments.

Method Overview
From an RGB-D scan of a 3D scene, our method learns to generate a high-quality reconstruction of the complete 3D scene, in a self-supervised fashion. The input RGB-D scan is represented as a truncated signed distance field (TSDF), as a sparse set of voxel locations within truncation and their corresponding distance values. The output complete 3D model of the scene is also generated as a sparse TSDF (similarly, a set of locations and per-voxel distances), from which a mesh can be extracted by Marching Cubes [19].
We design the 3D scene completion as a self-supervised process, enabling training purely on real-world scan data without requiring any fully-complete ground truth scenes. Since real-world scans are always incomplete due to occlusions and physical sensor limitations, this is essential for generating high-quality, complete models from real-world scan data. To achieve self-supervision, our main idea is to formulate the training from incomplete scan data to less incomplete scan data; that is, from an existing RGB-D scan we can remove frames in order to create a more partial observation of the scene. This enables learning to complete in regions where scan geometry is known while ignoring regions of unobserved space. Crucially, our generative model can then learn to generate more complete models than seen in a specific sample of the target data.
To obtain an output high-resolution 3D model of a scene, we propose Sparse Generative Neural Networks (SG-NN), a generative model to produce a sparse surface representation of a scene. We build upon sparse convolutions [14,13,6], which have been shown to produce compelling semantic segmentation results on 3D scenes by operating only on surface geometry. In contrast to these discriminative tasks where the geometric structure is given as input, we develop our SG-NN to generate new, unseen 3D geometry suitable for generative 3D modeling tasks. This is designed in coarse-to-fine fashion, with a progressively growing network architecture which predicts each next higher resolution, finally predicting a high-resolution surface as a sparse TSDF. Since our sparse generative network operates in a fully-convolutional fashion, we can operate on 3D scans of varying spatial sizes.

Self-Supervised Completion
Our approach for self-supervision of scene completion of RGB-D scans is based on learning how to complete scan geometry in regions that have been seen, while ignoring unobserved regions. To this end, we can generate input and target TSDFs with similar scanning patterns as real-world scans; from an input scan composed of RGB-D frames {f 0 , ...f n }, we can generate the target TSDF S target through volumetric fusion [7] of {f 0 , ...f n }, and the input TSDF S input through volumetric fusion of a subset of the original frames {f k } ⊂ {f 0 , ...f n }. Our self-supervision approach for scan completion learns through deltas in partialness of RGB-D scans. From a given (incomplete) RGB-D scan, on the left, we produce a more incomplete version of the scan by removing some of its depth frames (middle). We can then train to complete the more incomplete scan (middle) using the original scan as a target (left), while masking out unobserved regions in the target scene (in orange). This enables our prediction to produce scenes that are more complete than the target scenes seen during training, as the training process effectively masks out incompleteness.
This produces input incomplete scans that maintain scanned data characteristics, as well as a correspondence between S input and S target going from a more incomplete scan to a less incomplete scan. Since S target remains nonetheless incomplete, we do not wish to use all of its data as the complete target for supervision, as this could result in contradictory signals in the training set (e.g., table legs have been seen in one scan but not in another, then it becomes unclear whether to generate table legs).
Thus, to effectively learn to generate a complete 3D model beyond even the completeness of the target training data, we formulate the completion loss only on observed regions in the target scan. That is, the loss is only considered in regions where S target (v) > −τ , for a voxel v with τ indicating the voxel size. Figure 2 shows an example S input , S target , and prediction, with this self-supervision setup, we can learn to predict geometry that was unobserved in S target , e.g., occluded regions behind objects.

Data Generation
As input we consider an RGB-D scan comprising a set of depth images and their 6-DoF camera poses. For realworld scan data we use the Matterport3D [3] dataset, which contains a variety of RGB-D scans taken with a Matterport tripod setup. Note that for Matterport3D, we train and evaluate on the annotated room regions, whereas the raw RGB-D data is a sequence covering many different rooms, so we perform an approximate frame-to-room association by taking frames whose camera locations lie within the room.
From a given RGB-D scan, we construct the target scan S target using volumetric fusion [7] with 2cm voxels and truncation of 3 voxels. A subset of the frames is taken by randomly removing ≈ 50% of the frames (see Section 6 for more analysis of varying degrees of incompleteness in S input , S target ). We can then again use volumetric fusion to generate a more incomplete version of the scan S input .
At train time, we consider cropped views of these scans for efficiency, using random crops of size 64×64×128 voxels. The fully-convolutional nature of our approach enables testing on full scenes of varying sizes at inference time.

Generating a Sparse 3D Scene Representation
The geometry of a 3D scene occupies a very sparse set of the total 3D extent of the scene, so we aim to generate a 3D representation of a scene in a similarly sparse fashion. Thus we propose Sparse Generative Neural Networks (SG-NN) to hierarchically generate a sparse, truncated signed distance field representation of a 3D scene, from which we can extract the isosurface as the final output mesh.
An overview of our network architecture for the scene completion task is shown in Figure 3. The model is designed in encoder-decoder fashion, with an input partial scan first encoded to representative features at low spatial resolution, before generating the final TSDF output.
A partial scan, represented as a TSDF, is encoded with a series of 3D sparse convolutions [14,13] which operate only on the locations where the TSDF is within truncation distance and using the distance values as input features. Each set of convolutions spatially compresses the scene by a factor of two. Our generative model takes the encoding of the scene and converts the features into a (low-resolution) dense 3D grid. The dense representation enables prediction of the full scene geometry at very coarse resolution; here, we use a series of dense 3D convolutions to produce a feature map F 0 from which we also predict coarse occupancy O 0 and TSDF S 0 representations of the complete scene. We then construct a sparse representation of the predicted scene based on O 0 : the features input to the next level are Figure 3: Our Sparse Generative Neural Network architecture for the task of scan completion. An input scan is encoded using a series of sparse convolutions, each set reducing the spatial dimensions by a factor of two. To generate high-resolution scene geometry, the coarse encoding is converted to a dense representation for a coarse prediction of the complete geometry. The predicted coarse geometry is converted to a sparse representation and input to a our sparse, coarse-to-fine hierarchy, where each level of the hierarchy predicts the geometry of the next resolution (losses indicated in orange). The final output is a TSDF represented by sparse set of voxel locations and their corresponding distance values. composed as concat(F k , O k , S k ) ∀ sigmoid(O k (v)) > 0.5. This can then be processed with sparse convolutions, then upsampled by a factor of two to predict the scene geometry at the next higher resolution. This enables generative, sparse predictions in a hierarchical fashion. To generate the final surface geometry, the last hierarchy level of our SG-NN outputs sparse O n , S n , and F n , which are then input to a final set of sparse convolutions to refine and predict the output signed distance field values.
Sparse skip connections. For scene completion, we also leverage skip connections between the encoder and decoder parts of the network architecture, connecting feature maps of same spatial resolution. Since the feature maps are both sparse and typically will not contain the same set of sparse locations, we concatenate features from the set of source locations which are shared with the destination locations, and use zero feature vectors for the destination locations which do not exist in the source.
Progressive Generation. In order to encourage more efficient and stable training, we train our generative model progressively, starting with the lowest resolution, and introducing each successive hierarchy level after N level iterations. Each hierarchy level predicts the occupancy and TSDF of the next level, enabling successive refinement from coarse predictions, as shown in Figure 4.
Loss. We formulate the loss for the generated scene geometry on the final predicted TSDF locations and values, using an 1 loss with the target TSDF values at those locations. Following [11], we log-transform the TSDF values of the predictions and the targets before applying the 1 loss, in order to encourage more accurate prediction near the surface geometry. We additionally employ proxy losses at each hierarchy level for outputs O k and S k , using binary cross entropy with target occupancies and 1 with target TSDF values, respectively. This helps avoid a trivial solution of zero loss for the final surface with no predicted geometry. Note that for our self-supervised completion, we compute these losses only in regions of observed target values, as described in Section 4. Figure 4: Progressive generation of a 3D scene using our SG-NN which formulates a generative model to predict a sparse TSDF as output.

Training
We train our SG-NN on a single NVIDIA GeForce RTX 2080, using the Adam optimizer with a learning rate of 0.001 and batch size of 8. We use N level = 2000 iterations for progressive introduction of each higher resolution output, and train our model for ≈ 40 hours until convergence.

Results and Evaluation
We evaluate our sparse generative neural network on scene completion for RGB-D scans on both real-world scans where no fully complete ground truth is available [3], as well as in a supervised setting on synthetic scans which have complete ground truth information [29]. We use the train/test splits provided by both datasets, resulting in 72/18 and 5519/155 trainval/test scenes comprising 1788/394 and 39600/1000 rooms, respectively. To measure completion quality, we use an 1 error metric between the predicted TSDF and the target TSDF, where unobserved regions in the target are masked out. Note that unsigned distances are used in the error computation to avoid sign ambiguities. We measure the 1 distance in voxel units of the entire volume (entire volume), the unobserved region of the volume (unobserved space), near the target surface (target), and near the predicted surface (predicted), using a threshold of ≤ 1 to determine nearby regions, and a global truncation of 3. For all metrics, unobserved regions in the targets are ignored; note that on synthetic data where complete ground truth is available, we do not have any unobserved regions to ignore.
Comparison to state of the art. In Table 1, we compare to several state-of-the-art approaches for scan completion on real-world scans from the Matterport3D dataset [3]: the shape completion approach 3D-EPN [11], and the scene completion approach ScanComplete [12]. These approaches both require complete ground truth data for supervision, which is not available for the real-world scenes, so we train them on synthetic scans [29]. Since 3D-EPN and ScanComplete use dense 3D convolutions, limiting voxel resolution, we use 5cm resolution for training and evaluation of all methods. Our self-supervised approach enables training on incomplete real-world scan data, avoiding domain transfer while outperforming previous approaches that leverage large amounts of synthetic 3D data. Qualitative comparisons are shown in Figure 5.
In order to evaluate our SG-NN separate from its selfsupervision, we also evaluate scan completion on synthetic scans [29] with complete ground truth, in comparison to Poisson Surface Reconstruction [17,18], SSCNet [29], 3D-EPN [11], and ScanComplete [12]. Here, all data-driven approaches are fully supervised, using input scans from [12]. Similar to the real scan scenario, we train and evaluate at 5cm resolution due to resolution limitations of the Figure 5: Comparison to state-of-the-art scan completion approaches on Matterport3D [3] data (5cm resolution), with input scans generated from a subset of frames. In contrast to the fully-supervised 3D-EPN [11] and ScanComplete [12], our self-supervised approach produces more accurate, complete scene geometry.  Table 1: Quantitative scan completion results on real-world scan data [3], with 1 distance measured in voxel units for 5cm voxels. Since target scans are incomplete, unobserved space in the target is masked out for all metrics. 3D-EPN [11] and ScanComplete [12] require full supervision, and so are trained on synthetic data [29]. Despite their access to large quantities of synthetic 3D data, our self-supervised approach outperforms these methods while training solely on real-world data.
prior learned approaches. In Table 2, we see that our sparse generative approach outperforms state of the art in a fullysupervised scenario.
Can self-supervision predict more complete geometry than seen during training? Our approach to self-supervision is designed to enable prediction of scene geometry beyond the completeness of the target scan data, by leveraging knowledge of observed and unobserved space in RGB-D scans. In Table 3, we evaluate against another possible self-supervision approach: randomly cropping out target geometry to be used as incomplete inputs (using crops  Table 2: Quantitative scan completion results on synthetic scan data [29], where complete ground truth is available to supervise all data-driven approaches. 1 distance is measured in voxel units for 5cm voxels. for self-supervision). This scenario does not reflect the data characteristics of real-world scan partialness (e.g., from occlusions and lack of visibility), resulting in poor completion performance.
To evaluate the completion quality of our method against the completeness of the target scene data, we perform a qualitative evaluation, as we lack fully complete ground truth to for quantitative evaluation. In Figure 7, we see that our completion quality can exceed the completeness of target scene data. We additionally evaluate our approach with and without our self-supervision masking in Figure 7, where w/o self-supervision masking is trained using the same set of less-incomplete/more-incomplete scans but without the loss masking. This can perform effective completion in regions commonly observed in target scans, but often fails to complete regions that are commonly occluded. In contrast, our formulation for self-supervision using masking of unobserved regions enables predicting scene geometry even where the target scan remains incomplete.
What's the impact of the input/output representation? In Table 3, we evaluate the effect of a point cloud input (vs. TSDF input), as well as occupancy output (vs. TSDF output). We find that the TSDF representation has more potential descriptiveness in characterizing a surface (and its neighboring regions), resulting in improved performance in both input and output representation.
What's the impact of the degree of completeness of the target data during training? In Figure 6, we evaluate the effect of the amount of completeness of the target data avail- Figure 6: Evaluating varying target data completeness available for training.
We generate various incomplete versions of the Matterport3D [3] scans using ≈ 30%, 40%, 50%, 60%, and 100% (all) of the frames associated with each room scene, and evaluate on the 50% incomplete scans. Our self-supervised approach remains robust to the level of completeness of the target training data. able for training. We create several incomplete versions of the Matterport3D [3] scans using varying amounts of the frames available: ≈ 30%, 40%, 50%, 60%, and 100% (all) of the frames associated with each room scene. We train our approach using three different versions of input-target completeness: 50% − all (our default), 40% − 60%, and 30% − 50%. Even as the completeness of the target data decreases, our approach maintains robustness in predicting complete scene geometry.
Limitations Our SG-NN approach for self-supervised scan completion enables high-resolution geometric prediction of complete geometry from real-world scans. How-  Table 3: Ablation study of our self-supervision and generative model design choices on real-world scan data [3], with 1 distance measured in voxel units for 2cm voxels. ever, to generate the full appearance of a 3D scene, generation and inpainting of color is also required. Currently, our method also does not consider or predict the semantic object decomposition of a scene; however, we believe this would be an interesting direction, specifically in the context for enabling interaction with a 3D environment (e.g., interior redesign or robotic understanding).

Conclusion
In this paper, we presented a self-supervised approach for completion of RGB-D scan geometry that enables training solely on incomplete, real-world scans while learning a generative geometric completion process capable of predicting 3D scene geometry more complete than any single target scene seen during training. Our sparse generative approach to generating a sparse TSDF representation of a surface enables much higher output geometric resolution than previous on large-scale 3D scenes. Self-supervision allowing training only on real-world scan data for scan completion opens up new possibilities for various generative 3D modeling based only on real-world observations, perhaps mitigating the need for extensive synthetic data generation or domain transfer, and we believe this is a promising avenue for future research. Figure 7: Scan completion results on Matterport3D [3] data (2cm resolution), with input scans generated from a subset of frames. Our self-supervision approach using loss masking enables more complete scene prediction than direct supervision using the target RGB-D scan, particularly in regions where occlusions commonly occur.