Scalable Cloud-Native Pipeline for Efficient 3D Model Reconstruction from Monocular Smartphone Images

Potito Aghilar, Vito Walter Anelli, Michelantonio Trizio, Tommaso Di NoiaarXiv 2024

TL;DR

This paper introduces a scalable, cloud-native microservices pipeline that automatically reconstructs high-quality 3D models from standard 2D smartphone images. By combining Google's ARCore framework with a custom pose-compensation algorithm and NVIDIA's nvdiffrec, the system overcomes smartphone sensor drift to generate production-ready, textured 3D meshes ideal for industrial Digital Twins.

What Problem Does This Paper Address?

In the era of Industry 4.0, "Digital Twins"—virtual replicas of physical objects—are crucial for simulations and immersive personnel training. However, creating 3D models manually is a notorious bottleneck, demanding significant time, expertise, and resources.

While automated alternatives exist, they come with heavy trade-offs. Traditional photogrammetry and LIDAR require specialized hardware or tedious manual processing. On the AI side, popular Neural Radiance Fields (NeRF) methods excel at generating realistic views but typically output volumetric point clouds or untextured "gray meshes" full of holes. These outputs are largely unusable in standard 3D modeling software or game engines without extensive post-processing. The authors address the lack of an end-to-end, scalable pipeline that can transform simple monocular smartphone images into clean, fully textured, and immediately deployable 3D assets.

Methods

The authors designed a distributed architecture split between a mobile frontend for data collection and a cloud backend for heavy computation.

Fig. 1. A graphical representation of the proposed pipeline. In (a), the sequence of operations required to achieve the expected result are described. In (b), the data flow between the intermediate stages of the pipeline are illustrated.

The workflow consists of three main phases:

  1. Data Acquisition & Pose Compensation: An Android application captures 2D RGB images while leveraging Google's ARCore to track camera poses. To combat the sensor drifting problem—where tracking inaccuracies cause jagged surfaces in the final 3D model—the authors implemented a custom Pose Compensation Algorithm. This system tracks virtual anchors in the physical scene frame-by-frame, calculating a compensation matrix to smooth out trajectory jumps in real time.
  2. Dataset Preprocessing: Images are resized to 512×512 pixels. The pipeline then utilizes CarveKit, a deep-learning-based background removal framework running on a cloud GPU, to generate precise alpha masks (silhouettes) of the target object.
  3. Reconstruction: Instead of standard NeRF, the backend leverages NVIDIA’s nvdiffrec. This framework treats reconstruction as an "inverse rendering" problem. Using a deformable tetrahedral mesh (Deep Marching Tetrahedra, or DMTet), it jointly optimizes the object's 3D topology, spatially varying materials, and high-dynamic-range (HDR) environment lighting.

The entire backend is built using microservices architecture standards, containerized via Docker, and deployed on a Kubernetes cluster. It uses MinIO (an S3-compatible object storage solution) to cache intermediate outputs between stages.

Datasets

Not discussed in the paper as standard public benchmarks. Instead, the authors validated their pipeline using custom datasets captured directly via their Android application. The technical prerequisite for an object dataset consists of a collection of 512×512 RGB images, corresponding alpha masks, and a poses_bounds.npy file containing the camera view matrices and scene depth bounds.

Key Insights and Ideas

  • Stabilizing Smartphone Tracking: Standard smartphone AR tracking drifts over time, creating misalignments that ruin 3D reconstruction. By introducing a self-made anchor management system that calculates average delta poses frame-by-frame, the authors stabilized the camera trajectory without needing heavy, time-consuming offline structure-from-motion (SfM) tools like COLMAP.
  • Prioritizing Inverse Rendering over NeRF: While NeRF is excellent for viewing a scene from new angles, its output is notoriously difficult to edit. By choosing nvdiffrec, the pipeline directly outputs standard UV-mapped triangle meshes (.obj, .mtl) alongside separate diffuse, roughness, and normal maps. This makes the resulting assets instantly compatible with industry-standard engines like Blender, Unity, or Maya.

Key Results

The pipeline successfully automates the generation of complete, interactively viewable 3D models from smartphone photos.

  • Latency Breakdown: The end-to-end system latency is heavily dominated by the reconstruction phase. While data scanning and network transfer take roughly 120 seconds and preprocessing takes 30 seconds, the nvdiffrec optimization requires approximately 2 hours and 30 minutes on an NVIDIA Quadro M4000 GPU.
  • Reconstruction Fidelity: Using nvdiffrast to calculate image space loss (the difference between the rendered 3D model and the original reference photos), the system achieved a remarkably low loss of 0.010540 on the training set and 0.010293 on the validation set, demonstrating high visual accuracy.

Limitations and Future Work

The primary limitation of the current pipeline is its high computational latency; a 2.5-hour reconstruction time prevents real-time feedback during the scanning process. Additionally, the final mesh quality is highly sensitive to the automated alpha masking step. Errors in background segmentation can introduce structural artifacts, currently requiring manual user oversight to filter out bad masks.

For future work, the authors plan to explore advanced machine learning models to produce smoother mesh edges, refine the automated background removal process to eliminate manual checks, and implement multi-layer decomposition to break down the reconstructed 3D models into distinct, modular constituent parts.

Summary updated

BibTeX
@misc{aghilar2024scalable,
  author = {Potito Aghilar and Vito Walter Anelli and Michelantonio Trizio and Tommaso Di Noia},
  title = {{Scalable Cloud-Native Pipeline for Efficient 3D Model Reconstruction from Monocular Smartphone Images}},
  year = {2024},
  eprint = {2409.19322},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.19322},
}
Figure