OctNetFusion: Learning Depth Fusion from Data

Gernot Riegler, Ali Osman Ulusoy, Horst Bischof, Andreas Geiger

Introduction

Reconstructing accurate and complete 3D surface geometry is a core problem in computer vision. While image based techniques provide compelling results for sufficiently textured surfaces, the introduction of affordable depth sensors, in particular the Microsoft Kinect sensor, allows scanning a wide variety of objects and scenes. This has led to the creation of large databases of real-world 3D content , enabling progress in a variety of areas including 3D modeling , 3D reconstruction , 3D recognition and 3D scene understanding .

However, creating complete and accurate 3D models from 2.5D depth images remains a difficult problem. Challenges include sensor noise, quantization artifacts, outliers (e.g., bleeding at object boundaries) and missing data such as occluded surfaces. Some of these challenges can be addressed by integrating depth information from multiple viewpoints in a volumetric representation. In particular, Curless and Levoy demonstrate that averaging truncated signed distance functions (TSDF) allows for a simple yet effective approach to depth fusion which is used in a large number of reconstruction pipelines today .

Despite its popularity, TSDF fusion has two major drawbacks: First, it requires a large number of frames to smooth out sensor noise and outliers. Second, it does not allow for reconstructing occluded regions or completing large holes.

In this paper, we tackle these problems by proposing a learning-based solution to volumetric 3D fusion. By utilizing large datasets of 3D models and high capacity 3D convolutional neural networks (3D CNNs), our approach learns to smooth out sensor noise, deals with outliers and completes missing 3D geometry. To the best of our knowledge, our approach is the first to learn volumetric fusion from noisy depth observations.

3D CNNs are a natural choice for formulating this task as an end-to-end learning problem. However, existing deep learning approaches are limited to small resolutions (typically 32332^{3} voxel grids) due to the cubic growth in memory requirements. A notable exception is the OctNet approach of Riegler et al. which takes advantage of the sparsity of 3D volumetric models using an octree representation , enabling deep learning at resolutions of 2563256^{3} voxels and beyond.

The main limitation of OctNets , however, is that the octree representation is derived from the input and fixed during learning and inference. While this is sufficient for tasks such as 3D classification or semantic segmentation where the input and the output share the same octree representation, the OctNet framework does not directly apply to tasks where the 3D space partitioning of the output is unknown a priori and may be different than that of the input. In particular, for tasks such as depth map fusion and 3D completion the location of the implicit surface is unknown and needs to be inferred from noisy observations.

The key contribution of this paper is to lift this restriction. More specifically, we propose a novel 3D CNN architecture termed OctNetFusion which takes as input one or more depth images and estimates both the 3D reconstruction and its supporting 3D space partitioning, i.e. the octree structure of the output. We apply this architecture to the depth map fusion problem and formulate the task as the prediction of truncated signed distance fields which can be meshed using standard techniques .

We evaluate our approach on synthetic and real-world datasets, studying several different input and output representations, including TSDF. Our experiments demonstrate that the proposed method is able to reduce noise and outliers compared to vanilla TSDF fusion while avoiding the shrinking bias of local regularizers such as TV-L1 . Besides, our model learns to complete missing surfaces and fills in holes in the reconstruction. We demonstrate the flexibility of our model by evaluating it on the task of volumetric shape completion from a single view where we obtain improvements wrt. the state-of-the-art . Our code is on GitHub: https://github.com/griegler/octnetfusion.

Related Work

Volumetric Fusion: In their seminal work, Curless and Levoy proposed to integrate range information across viewpoints by averaging truncated signed distance functions. The simplicity of this method has turned it into a universal approach that is used in many 3D reconstruction pipelines. Using the Microsoft Kinect sensor and GPGPU processing, Newcombe et al. showed that real-time 3D modeling is feasible using this approach. Large-scale 3D reconstruction has been achieved using iterative re-meshing and efficient data structures . The problem of calibration and loop-closure detection has been considered in . Due to the simplicity of the averaging approach, however, these methods typically require a large number of input views, are susceptible to outliers in the input and don’t allow to predict surfaces in unobserved regions.

Noise reduction can be achieved using variational techniques which integrate local smoothness assumptions into the formulation. However, those methods are typically slow and can not handle missing data. In this paper, we propose an alternative learning based solution which significantly outperforms vanilla TSDF fusion and TV-L1 fusion in terms of reconstruction accuracy.

Ray Consistency: While TSDF fusion does not explicitly consider free space and visibility constraints, ray potentials allow for modeling these constraints in a Markov random field. Ulusoy et al. consider a fully probabilistic model for image based 3D reconstruction. Liu and Cooper formulate the task as MAP inference in a MRF. In contrast to our method, these algorithms do not learn the geometric structure of objects and scene from data. Instead, they rely on simple hand-crafted priors such as spatial smoothness , or piecewise planarity . Notably, Savinov et al. combine ray potentials with 3D shape regularizers that are learned from data . However, their regularizer is local and relies on a semantic segmentation as input. In this work, we do not consider the semantic class of the reconstructed object or scene and focus on the generic 3D reconstruction problem using a global model.

Shape Completion: If exact 3D models are available, missing surfaces can be completed by detecting the objects and fitting 3D models to the observations . In this paper, we assume that such prior knowledge is not available. Instead we directly learn to predict the 3D structure from training data in an end-to-end fashion.

Shape completion from a single RGB-D image has been tackled in . While use a CRF for inference, predict structured outputs using a random forest and use a CNN to jointly estimate voxel occupancy and semantic class labels. In contrast to our approach, these methods reason at the voxel level and therefore do not provide sub-voxel surface estimates. Furthermore, existing 3D CNNs are limited in terms of resolution. In this paper, we demonstrate a unified approach which allows to reason about missing 3D structures at large resolution while providing sub-voxel surface estimates. In contrast to single-image reconstruction methods, our approach naturally handles an arbitrary number of input views. For the task of 3D shape completion from a single image we obtain results which are superior to those reported by Firman et al. .

In very recent work, Dai et al. consider the problem of high-resolution 3D shape completion. Their approach first regresses 32332^{3} voxel volumes using a 3D CNN, followed by a multi-resolution 3D shape synthesis step using a large database of 3D CAD models . While their object-centric approach is able to reconstruct details of individual objects with known 3D shape, we put our focus on general 3D scenes where such knowledge is not available.

Method

This section introduces our OctNetFusion architecture. Our work builds upon the recent work of 3D octree convolutional networks . As our work specifically extends , we follow its notation whenever possible. To make this paper self-contained, we first briefly review OctNet in Section 3.1. Then, we present our OctNetFusion approach in Section 3.2 which learns to jointly estimate the output quantity (e.g., signed distance or occupancy) and the space partitioning. Section 3.3 specifies the feature representations considered in our experiments.

The main limitation of conventional 3D CNNs that operate on regular voxel grids is the cubic growth in memory requirements with respect to the voxel resolution. However, 3D data is often sparse in nature . For instance, the surface of an object can be interpreted as a 2D manifold in 3D space. Riegler et al. utilize this observation and define a CNN on the grid-octree data structure of . The data structure itself consists of a grid of shallow octrees with maximum depth D=3D=3, trading off computation and memory. The structure of the shallow octrees can be efficiently encoded as bit strings that allows for rapid retrieval of neighboring cells. One important property of OctNets is that none of the operations (i.e., convolution, pooling, unpooling) changes the grid-octree data structure which is based on the input (e.g., point cloud, voxel grid). This can be seen as a data-adaptive pooling operation which maps the output of each layer back to the grid-octree representation.

Let Ω[i,j,k]\Omega[i,j,k] denote the smallest grid-octree cell that contains the voxel at (i,j,k)(i,j,k). Ω[i,j,k]\Omega[i,j,k] can be interpreted as the set of voxel indices, whose data is pooled to a single value as described above. Furthermore, ∣Ω[i,j,k]∣|\Omega[i,j,k]| denotes the number of voxels comprised by this cell. If the cell is at the finest resolution of the tree, we have ∣Ω[i,j,k]∣=1|\Omega[i,j,k]|=1, i.e., the cell is equal to the voxel in Ti,j,kT_{i,j,k}. In contrast, if the complete shallow octree consists of only a single leaf cell, then ∣Ω[i,j,k]∣=512|\Omega[i,j,k]|=512 as all 838^{3} voxels are pooled.

Given this basic notation, the authors of show how the convolution, pooling and unpooling operation can be efficiently implemented on this data structure. We refer to for further details.

2 OctNetFusion

The main drawback of OctNets is that the octree structure of the input and output, i.e. the partitioning of the 3D space, has to be known a priori. This is a reasonable assumption for tasks like 3D point cloud labeling (e.g., semantic segmentation) where the input and the output octree structures are the same. However, for tasks where the output geometry is different from the input geometry, e.g., in volumetric fusion or shape completion, the grid-octree data structure has to be adapted during inference.

We now present our OctNetFusion architecture, illustrated in Fig. 2, which allows to learn the grid-octree structure along with the 3D task in a principled manner.

Network Architecture: Our overall network architecture is illustrated in Fig. 2(a). We represent the voxelized input and output using the grid-octree structure described in Section 3.1. The input to the network is a feature volume (e.g., TSDF), calculated from a single or multiple depth maps, see Section 3.3 for details. The output may encode a TSDF or a binary occupancy map, depending on the application.

As the 3D input to our method can be sparse and incomplete, we refrain from using the classical U-shaped architecture as common for 2D-to-2D prediction tasks . Instead, we propose a coarse-to-fine network with encoder-decoder modules, structure manipulation modules and a loss defined at every pyramid level. More specifically, we create a 3D scale pyramid where the number of voxels along each dimension increases by a factor of two between pyramid levels. At each level, we process the input using an encoder-decoder module which enlarges the receptive field and captures contextual information. We pass the resulting features to a structure manipulation module which computes the output at the respective resolution, increases the resolution and updates the structure of the network for further processing. We propagate features to successively finer resolutions until we have reached the final target resolution. We will now describe the encoder-decoder module and the structure module in detail.

Encoder-Decoder Module: The encoder-decoder module is illustrated in Fig. 2(b). It combines convolution layers with pooling and unpooling layers similar to the segmentation network used in . All convolutional layers are followed by a ReLU non-linearity . The convolution layer before each pooling operation doubles the number of feature maps while the convolution layer after each unpooling operation halves the number of features. Pooling operations reduce spatial information but increase the level of context captured in the features. The result of the unpooling operation is concatenated with the corresponding high-resolution features from the encoder path to combine high-resolution information with low-resolution contextual cues.

Structure Module: As discussed above, the unpooling operation of the original OctNet architecture has one major drawback: the octree structure must be known in advance to determine which voxels shall be split. While for 3D point labeling the structure can be split according to the input, the final output structure is unknown for tasks like volumetric fusion or completion. Naïvely splitting all voxels would eliminate the advantage of the data-adaptive representation and limit the output resolution to small volumes.

Consequently, we introduce a structure module after each encoder-decoder module which determines for each voxel if it shall be split (i.e., close to the surface) or not (i.e., far from the surface). Our structure module is illustrated in Fig. 3. The main idea is to add a split mask to the standard unpooling operation that indicates which of the octree cells should be further subdivided. This splitting mask is then used to subdivide the unpooled grid-octree structure.

More formally, let us consider an input grid-octree structure OO with nn feature channels and D×H×WD\times H\times W shallow octrees as illustrated in Fig. 3. After the unpooling operation we obtain a structure PP that consists of 2D×2H×2W2D\times 2H\times 2W shallow octrees where each octree cell comprises eight-times the number of voxels, i.e., ∣ΩP[2i,2j,2k]∣=8∣ΩO[i,j,k]∣|\Omega_{P}[2i,2j,2k]|=8|\Omega_{O}[i,j,k]|.

To determine the new octree structure, we additionally predict a reconstruction RR at the resolution of OO using a single convolution followed by a sigmoid non-linearity or a 1×11\times 1 convolution depending on the desired output (occupancy or TSDF, respectively). A reconstruction loss (Δ\Delta) ensures that the predicted reconstruction is close to the ground truth reconstruction at each resolution of the scale pyramid (for learning the network we provide the ground truth reconstruction at each resolution as described in Section 4).

We define the split mask implicitly by the surface of the reconstruction RR. The surface is defined by the gradients of RR when predicting occupancies or by the zero-levelset of RR in the case of TSDF regression. Given the surface, we split all voxels within distance τ\tau from the surface. For TSDF regression, τ\tau equals the truncation threshold. For occupancy classification, τ\tau is a flexible parameter which can be tuned to trade reconstruction accuracy vs. memory usage. The output of this split operation finally yields the high resolution structure QQ which serves as input to the next level.

3 Input / Output Encoding

This section describes the input and output encodings for our method. An ablation study, analyzing the individual encodings is provided in Section 4.

The input to our method are one or more 2.5D depth maps. We now discuss several ways to project this information into 3D voxel space which, represented using grid-octree structures, forms the input to the OctNetFusion architecture described above. The traditional volumetric fusion approach calculates the weighted average TSDF with respect to all depth maps independently for every voxel where the distance to the surface is measured along the line of sight to the sensor. While providing for a simple one-dimensional signal at each voxel, this encoding does not capture all information due to the averaging operation. Thus, we also explore higher dimensional input encodings which might better retain the information present in the sensor recordings. We now formalize all input encodings used during our experiments, starting with the simplest one.

Occupancy Fusion (1D): The first, and simplest encoding fuses information at the occupancy level. Let dv(i)d_{v}^{(i)} be the depth of the center of voxel vv wrt. camera ii. Further, let dc(i)d_{c}^{(i)} be the value of the depth map when projecting voxel vv onto the image plane of camera ii. Denoting the signed distance between the two depth values δv(i)=dc(i)−dv(i)\delta_{v}^{(i)}=d_{c}^{(i)}-d_{v}^{(i)}, we define the occupancy of each voxel o(v)o(v) as

where ss is the size of voxel vv. The interpretation is as follows: If there exists any depth map in which voxel vv is observed as free space the voxel is marked as free, otherwise it is marked as occupied. While simple, this input encoding is susceptible to outliers in the depth maps and doesn’t encode uncertainty. Furthermore, the input distance values are not preserved as only occupancy information is encoded.

TSDF Fusion (1D): Our second input encoding is the result of traditional TSDF fusion as described in . More specifically, we project the center of each voxel into every depth map, calculate the TSD value using a truncation threshold τ\tau (corresponding to the size of four voxels in all our experiments), and average the result over all input views. While various weight profiles have been proposed , we found that the simple constant profile proposed by Newcombe et al. performs well. This input representation is simple and preserves distances, but it does not encode uncertainty and thus makes it harder to resolve conflicts.

TDF + Occupancy Fusion (2D): The TSDF encoding can also be split into two channels: one channel that encodes the truncated unsigned distance to the surface (TDF) and one that encodes occupancy. Note that, if t(v)t(v) is the TDF of voxel vv, and o(v)o(v) its occupancy, then −t(v)⋅o(v)-t(v)\cdot o(v) is equivalent to the truncated signed distance function of vv.

Histogram (10D): While the previous two encodings captures surface distance and uncertainty, they do not maintain the multi-modal nature of fused depth measurements. To capture this information, we propose a histogram-based representation. In particular, we encode all distance values for each voxel using a 10D histogram with 5 bins for negative and 5 bins for positive distance values. The first and the last bin of the histogram capture distance values beyond the truncation limit, while the bins in between collect non-truncated distance values. To allow sub-voxel surface estimation, we choose the histogram size such that a minimum of 2 bins are allocated per voxel. Furthermore, we populate the histogram in a smooth fashion by distributing the vote of each observation linearly between the two closest bins, e.g., we assign half of the mass to both neighboring bins if the prediction is located at their boundary.

3.2 Output Encoding and Loss

Finally, we describe the output encodings and the loss we use for the volumetric fusion and the volumetric completion tasks we consider in the experimental evaluation.

Volumetric Completion: For volumetric completion from a single view, we use a binary occupancy representation to match the setup of the baselines as closely as possible. Following common practice, we leverage the binary cross entropy loss for training the network.

Evaluation

In this section, we present our experiments and evaluations. In Section 4.1 we consider the task of volumetric fusion from multiple depth images and in Section 4.2 we compare our approach to a state-of-the-art baseline on the task of volumetric completion from a single depth image.

In this section we consider the volumetric fusion task. We evaluate our OctNetFusion approach on the synthetic ModelNet40 dataset of Wu et al. as well as on real Kinect object scans that are generated using the depth image dataset by Choi et al. .

Unfortunately, the ground truth TSDF can not be calculated directly from the 3D models in ModelNet as the meshes are not watertight, i.e., they contain holes and cracks. Moreover, the meshes typically do not have consistently oriented normals. Instead, we obtain the ground truth TSDF by densely sampling views around the object, rendering the input 3D model from all views and running traditional volumetric fusion on all generated (noise-free) depth maps. We found that 8080 views cover all object surfaces and hence allow for computing highly accurate TSDF ground truth. For each of the categories we used 200200 models for training and 2020 for testing from the provided train/test split, respectively.

Besides the synthetic ModelNet dataset, we also evaluated our approach on real data from a Kinect RGB-D sensor. In particular, we use the 1010 videos captured by Choi et al. which include a diverse set of objects such as chairs, tables, trash containers, plants, signs, etc. Unfortunately, the dataset does not include ground-truth 3D models or camera poses. We thus estimated the camera poses using Kintinuous and visually inspect all models to remove those for which the pose tracking failed. Similar to the ModelNet experiments, we leverage TSDF fusion to obtain reference 3D models. However, for this dataset we leverage 10001000 viewpoints for each object to average the effect of noise. This is possible as the dataset has been carefully collected with many slow camera motion and many redundant views. At test time we provide only a small fraction of views (10-20) to each algorithm to simulate challenging real-world conditions. Example reference models produced by this procedure are shown in Fig. 4. We augment the dataset by generating 2020 different view configurations per scene by selecting different and disjoint subsets of view points at random.

We train each stage of the network with a constant learning rate of 10−410^{-4} and Adam as optimizer. We train the first stage for 5050 epochs, and the next two stages for 2525 epochs each. We initialize the first stage according to the randomization scheme proposed in , and initialize the weights of the other stages with those of the previous stage.

Input Encoding: We first investigate the impact of the input encodings discussed in Section 3.3.1 on the quality of the output. Towards this goal, we scaled the ModelNet objects to fit into a cube of 3×3×33\times 3\times 3 meters and rendered the depth maps onto 44 equally spaced views sampled from a sphere. To simulate real data, we added depth dependent Gaussian noise to the inputs as proposed in .

Our results are shown in Table 1. We compare the traditional volumetric fusion approach of Curless et al. (”VolFus”) and the variational approach of Zach et al. (”TV-L1”) to our method using the input encodings described in Section 3.3.1. The parameters of the baselines have been chosen based on cross-validation. We evaluate our results in terms mean absolute distance (MAD) which we compute over all voxels in the scene. Each row shows results at a particular resolution, ranging from 64364^{3} to 2563256^{3} voxels.

First, we observe that our model outperforms the traditional fusion approach as well as TV-L1 fusion by a large margin. Improvements are particularly pronounced at high resolutions which demonstrates that our learning based approach is able to refine and complete geometric details which can not be recovered using existing techniques. Furthermore, we observe that the TSDF histogram based encoding yields the best results. We thus use this input encoding for all experiments that follow.

Number of Views: Next, we evaluate the performance of our network when varying the number of input views from one to six on the ModelNet dataset. All experiments are conducted at a resolution of 2563256^{3} voxels. Our results are shown in Table 2. Again, our approach outperforms both baselines in all categories. As expected, performance increases with the number of viewpoints. The largest difference between the baseline and our approach is visible for the experiment with only one input view. While no fusion is performed in this case, this demonstrates that our learned model is effective in completing missing geometry. When considering four input views, our approach reduces errors by a factor of 22 to 33 wrt. TSDF fusion and TV-L1 fusion.

Noise on Input: In our next experiment we evaluate the impact of noise in the depth maps on the reconstruction. Table 3 summarizes our results. We observe that our method is faithful wrt. the increase of input noise. The MAD increases from 0.2740.274 mm for no noise to 0.3740.374 mm for severe noise (σ=0.03\sigma=0.03). In contrast, for TSDF fusion the MAD increases by more than 0.50.5 mm and for TV-L1 fusion by more than 0.20.2 mm.

Generalization on Unseen Categories: Most existing approaches that leverage deep learning for 3D reconstruction train a model specific for a particular object class which typically does not generalize well to other classes or scenes with varying backgrounds as present in the scans of Choi et al. . In contrast, here we are interested in 3D reconstruction of general scenes. We therefore analyze how our model behaves on shapes that where not seen during training. In Table 4 we trained a network on only 88 categories out of 1010 and use the two unseen ones for testing (”Unseen”). We compare these results to the case where we train on all 1010 categories (”Seen”). Note that in neither case training shapes are part of the test set, but shapes from the same category are used or ignored. While we can observe a slight decrease in performance for the unseen categories, it is still far better than simple TSDF fusion, or TV-L1 fusion.

Qualitative Results on ModelNet: We show qualitative results on ModelNet in Fig. 5 using the TSDF encoding and 44 views. The same TSDF truncation threshold has been used for traditional fusion, our OctNetFusion approach and the ground truth generation process. While the baseline approach is not able to resolve conflicting TSDF information from different viewpoints, our approach learns to produce a smooth and accurate 3D model from highly noisy input.

Kinect Object Scans: To evaluate the performance of our algorithm on real data, we use the dataset of Kinect object scans published by Choi et al. . For this experiment we vary the number of input views from ten to twenty as the scenes are larger and the camera trajectories are less regular than in the synthetic ModelNet experiments. Our results are shown in Table 5. While overall errors are larger compared to the ModelNet experiments, we again outperform the traditional fusion approach at all resolutions and for all number of input views. Notably, the relative difference between the two methods increases with finer resolution which demonstrates the impact of learned representations for reconstructing details. In contrast to the experiments on ModelNet, the TV-L1 baseline reduces errors more substantially when compared to vanilla volumetric fusion , yet our method is consistently more accurate.

Runtime: Given its simplicity, Vanilla TSDF fusion is the fastest method, using just a few milliseconds on a GPGPU. In contrast, TV-L1 fusion is computationally more expensive. We ran all experiments using 700700 iterations of the optimization algorithm. For an output resolution of 64364^{3} TV-L1 needs 0.580.58 seconds on average and for an output resolution of 2563256^{3} it needs 24.6624.66 seconds on average. In comparison, our proposed OctNetFusion CNN requires 0.0050.005 seconds on average for an output resolution of 64364^{3} and 10.110.1 seconds on average for an output resolution of 2563256^{3}. All numbers were obtained on a NVidia K80 GPGPU.

2 Volumetric Completion

In this section, we provide a comparison to Firman’s Voxlets approach et al. on the task of volumetric shape completion from a single image. For this experiment, we use the dataset and metrics proposed by and modify our model to predict binary occupancy maps instead of real-valued TSDFs. Our results are shown in Table 6. Qualitative results for three different scenes are visualized in Fig. 6. As evidenced by our results, our approach improves upon Voxlets as well as the method of Zheng et al. in terms of intersection-over-union (IoU) of the occupied space, precision and recall. Unfortunately, even after communication with the authors we were not able to reproduce their results due to post-publication changes in their dataset.

Conclusion

We propose OctNetFusion, a deep 3D convolutional neural network that is capable of fusing depth information from different viewpoints to produce accurate and complete 3D reconstructions. Our experiments demonstrate the advantages of our learning-based approach over the traditional fusion baseline and show that our method generalizes to novel object categories, producing compelling results on both synthetic and real Kinect data. While in this paper we have focused on the problem of fusing depth maps, an interesting direction for future work is to extend our model to 3D reconstruction from RGB images where 3D representations are learned jointly with 2D image representations in an end-to-end fashion.

References