CVT-xRF: Contrastive In-Voxel Transformer for 3D Consistent Radiance Fields from Sparse Inputs

Yingji Zhong, Lanqing Hong, Zhenguo Li, Dan Xu

Abstract

Neural Radiance Fields (NeRF) typically require dense multi-view supervision to reconstruct high-quality 3D scenes. Under sparse-view conditions, NeRF often suffers from "floating artifacts" and geometric ambiguity due to a lack of spatial constraints. We present CVT-xRF, a modular "plug-and-play" framework that enforces 3D spatial consistency through an In-Voxel Transformer and a voxel-based contrastive loss. By regularizing the 3D field directly rather than relying solely on 2D image-plane priors, CVT-xRF significantly improves reconstruction quality in extreme sparse-view scenarios, such as 3-view setups, achieving substantial gains in PSNR and visual fidelity.

1. Introduction

The advent of Neural Radiance Fields (NeRF) has revolutionized novel view synthesis, enabling the generation of photorealistic 3D representations from 2D images. However, the performance of NeRF is heavily dependent on the density of input views. When provided with sparse inputs (e.g., 3 to 9 images), the optimization process becomes under-constrained. This leads to common failure modes, including "floaters" (random density in empty space) and a failure to distinguish between foreground and background geometry.

Existing solutions often attempt to mitigate these issues using 2D image-plane regularizations, such as depth smoothness or color consistency. However, these methods frequently overlook the fundamental 3D relationship: points that are physically proximal in 3D space should exhibit similar geometric and appearance properties. CVT-xRF addresses this gap by introducing 3D-aware constraints directly into the volumetric representation.

2. Methodology

CVT-xRF is designed as a modular enhancement that can be integrated into various NeRF baselines (e.g., BARF, SPARF). It employs three primary components to enforce 3D consistency.

2.1 Voxel-based Ray Sampling

Standard NeRF training samples rays randomly across the entire image. In contrast, CVT-xRF utilizes voxel-based ray sampling. The system partitions the 3D scene into small cubes (voxels) and ensures that sampled rays pass through these specific 3D neighborhoods. This strategy focuses the learning process on local spatial structures, providing a foundation for local regularization.

2.2 Local Implicit Constraint: In-Voxel Transformer

To model the relationships between neighboring points, the authors introduce an In-Voxel Transformer. Within a given voxel, the model samples "surrounding points" and "ray points." The Transformer takes the features of these surrounding points as input to predict the color and density of the points along the ray. By acting as a local geometric interpolator, the Transformer forces the model to learn how neighboring regions in 3D space interact, effectively "filling in the gaps" where view supervision is missing.

2.3 Global Explicit Constraint: Voxel Contrastive Loss

To ensure the 3D field remains discriminative and consistent, a contrastive learning objective is applied. Features within the same voxel are treated as positive pairs, while features from different voxels are treated as negative pairs. This Voxel Contrastive Loss encourages the network to produce a coherent 3D representation, preventing the emergence of "mushy" or homogeneous fields that often plague sparse-view reconstructions.

3. Experiments and Results

The effectiveness of CVT-xRF was evaluated on the DTU and Synthetic NeRF datasets, focusing on extreme sparsity (3, 6, and 9 views).

3.1 Quantitative Performance

The inclusion of CVT-xRF leads to dramatic improvements in image quality metrics. On the DTU 3-view benchmark, CVT-xRF improved the PSNR of a vanilla NeRF baseline from 6.68 to 14.13—a significant +7.45 dB increase. On the Synthetic NeRF dataset (3-view), it achieved a PSNR of 21.58, outperforming specialized sparse-view methods like FreeNeRF (20.75).

3.2 Qualitative Analysis

Visually, CVT-xRF effectively eliminates the "cloudy" artifacts and floaters typical of sparse-view NeRF. Depth maps generated by the model show significantly sharper object boundaries and cleaner empty space, indicating that the 3D-aware constraints successfully guide the model toward physically plausible geometries.

3.3 Computational Overhead

While the In-Voxel Transformer introduces additional computation, the overhead remains manageable. For a standard DTU scene, memory usage increased from 4.4GB to 6.4GB, and training time rose from 1.6 hours to 2.8 hours. This trade-off is considered acceptable given the substantial gains in reconstruction quality.

4. Discussion and Limitations

Despite its success, CVT-xRF has certain limitations. The method is sensitive to voxel size; while generally robust, the optimal partitioning of a scene remains a manual challenge. Additionally, as the complexity of the Transformer increases (e.g., more attention blocks), training becomes more difficult without specialized pre-training. Future work may explore automated voxel scaling and more efficient Transformer architectures for city-scale scenes.

5. Conclusion

CVT-xRF demonstrates that 3D spatial consistency is a powerful prior for sparse-view NeRF reconstruction. By combining voxel-based sampling, local Transformer-based interpolation, and global contrastive learning, the method provides a robust "plug-and-play" solution for generating high-quality 3D scenes from minimal data.

Summary updated

BibTeX
@inproceedings{zhong2024cvt,
  author = {Yingji Zhong and Lanqing Hong and Zhenguo Li and Dan Xu},
  title = {{CVT-xRF: Contrastive In-Voxel Transformer for 3D Consistent Radiance Fields from Sparse Inputs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure