A major bottleneck in scaling robotics is lack of action annotated data in diverse environments. This is because the skills of our current robotic system are limited and thus directly collecting data with these limited skills in real world will not scale. Another source of data is passive videos from internet, however, they lack kinesthetic action labels for facilitating imitation learning. Simulation has recently emerged as a promising source of generating robot data since it can generate annotated data at scale without needing to deploy actual robots in the real-robot. However, a key limitation with simulation is its gap with the real world. Often the simulation environments are populated with 3D assets. Traditionally, expert human artists spend several hours manually generating 3D assets. Such generation typically involves modelling the geometry and the shape, designing the texture and material properties and finally coming up with plausible physical parameters for the objects. Naturally, this makes 3D content generation hard to scale. Moreover, these assets usually lack visual diversity since the textures and shapes are human-generated. In this work, we aim to automate this problem by generating assets conditioned on in-the-wild 2D RGB images of the object. Using in-the-wild images and lifting them into 3D assets naturally makes the generated assets diverse since the underlying RGB images cover the natural variability of objects we see in our world. This, however, is a chicken-and-egg problem: we want to produce diverse 3D assets, but training such a model potentially needs diverse 3D asset annotations. We propose to break this deadlock by leveraging semantic priors from strong generative models trained on vast amounts of 2D web-scale data and 3D priors from Neural Radiance Field models.
Besides generating assets, scaling up simulation requires additional information about the state of the object and its physical properties. Recently, Large Language Models (LLM) have shown impressive performance in many commmonsense reasoning tasks, which shows that these models know about the common and basic properties of the objects. Thus, in this work, we prompt LLMs to output the state information for the generated assets and use it to populate an actual simulation environment. While we do not perform any robot learning with our simulation, we show a promising way to scale up simulation environments to match the visual diversity of the real-world.
Several recent works have explored similar ideas. DreamFusion [4], Fantasia3D [1], and Magic3D [2] build a text-to-3D asset generation model which takes as input a text-prompt and generate a plausible 3D asset that matches the description using priors learned by 2D diffusion models. However, these works do not condition on an input image, and thus cannot lift a specific 2D object instance to 3D. RealFusion [3], MakeIt3D [6], and Gina3D [5] address this issue by conditioning on input RGB-images and generate novel images of these objects from user-supplied camera poses. Rather than generating a novel image from a new camera pose, we directly optimize a 3D asset neural radiance field model, render a novel image from our 3D model and utilize the 3D score-distillation priors from models like RealFusion. We hypothesize that this would lead to better 3D generation quality since we jointly incorporate the 3D consistency and diffusion priors instead of sequentially generating novel images and then fitting a NerF on the generated images.
Our model automates 3D asset generation by mapping 2D images of objects to textured 3D meshes with plausible physics parameters. The images can be:
Given a real or generated 2D image of an object, we lift it to a 3D model by minimizing re-reprojection error and maximizing likelihood of its image renderings using a diffusion model. We provide background on image diffusion models below before we describe our 3D model fitting approach.
A diffusion model learns to model a probability distribution $p(x)$ by inverting a process that gradually adds noise to the image $x$. The diffusion process is associated with a variance schedule $\{\beta_t \in (0,1)\}_{t=1}^{T}$, which defines how much noise is added at each time step. The noisy version of sample $x$ at time $t$ can then be written as $x_t = \sqrt{\bar{\alpha}_t} x + \sqrt{1-\bar{\alpha}_t} \epsilon$, where $\epsilon \sim \mathcal{N}(\mathbf{0},\mathbf{1})$ is a sample from a Gaussian distribution (with the same dimensionality as $x$), $\alpha_t = 1- \beta_t$, and $\bar{\alpha}_t = \prod_{i=1}^t \alpha_i$. One then learns a denoising neural network $\hat \epsilon = \epsilon_{\phi}(x_t;t)$ that takes as input the noisy image $x_t$ and the noise level $t$ and tries to predict the noise component $\epsilon$. Diffusion models can be easily extended to draw samples from a distribution $p(x|\text{cond})$ conditioned on a prompt $\text{cond}$, where $\text{cond}$ can be a text description, a camera pose, and image semantic map, etc. Conditioning on the prompt can be done by adding $text{cond}$ as an additional input of the network $\epsilon_\phi$. For 3D lifting, we build on Zero-1-to-3, a diffusion model for novel object view synthesis that conditions on an image view of an object and a relative camera rotation around the object to generate plausible images for the target object viewpoint, $text{cond} = [I_1,\pi]$. It is trained on a large collection $\mathcal{D'} = \{(x^i, text{cond}^i)\}_{i=1}^N$ of images paired with views and relative camera orientations as conditioning prompt by minimizing the loss:
\begin{equation*} \mathcal{L}_\text{diff}(\phi;\mathcal{D}') = \tfrac{1}{|\mathcal{D}'|} \sum_{x^i, text{cond}^i\in\mathcal{D}'} || \epsilon_{\phi}(\sqrt{\bar{\alpha}_t} x^i + \sqrt{1-\bar{\alpha}_t} \epsilon, text{cond}^i , t) - \epsilon ||^2. \end{equation*}Given an image and relative camera pose 2D diffusion model $p(I|[I_0,\pi])$, we extract from it a 3D rendition of the input image $I_0$, represented by a differential 3D representation using Score Distillation Sampling (SDS). We do so by randomly sampling a camera pose $\pi$, rendering a corresponding view $I_\pi$, assessing the likelihood of the view based on a diffusion model $p(I_\pi|[I_0,\pi])$, and updating the differentiable 3D representation to increase the likelihood of the generated view based on the model. Specifically, the diffusion model is frozen and the 3D model is updated as:
\begin{equation*} \nabla(\theta)\mathcal{L}_{SDS}(\theta; \pi, text{cond}, t) = \mathbb{E}_{t,\epsilon}[w(t)(\epsilon_\phi(a_t I + \sigma_t\epsilon;t, text{cond}) - \epsilon) \cdot \nabla_{\theta} I ], \end{equation*}where $I = R(\theta, \pi)$ is the image rendered from a given viewpoint $\pi$. The loss we use to backpropagate to the 3D model parameters $\theta$ includes an image re-projection loss for the camera viewpoint of the input image, and score distillation for the other views, using a pre-trained view and pose conditioned image diffusion model of to measure 2D image likelihood. We use a two-stage fitting, wherein the first stage an instantNGP NeRF representation is used, similar to RealFusion, and in the second stage a mesh-based representation is initialized from the NeRF and finetuned differentiably, similar to Fantasia3D. More information of our score distillation sampling can be found in our website.
We augment the textures of our generated assets using the method of TEXTure which iteratively edits a mesh's texture by rendering the mesh from different viewpoints and updating the rendered 2D images. While domain randomization randomly re-textures simulated assets, TEXTure produces diverse yet plausible texture augmentations.
The visual and collision parameters of an asset are generated from the Image-to-Mesh pipeline discussed above. To define 3D sizes and physics parameters for the generated 3D meshes, we query GPT-4 regarding the range of plausible width, height, and depth for each object, and the range of its mass given its category. We then scale the generated 3D mesh based on the generated size range. We feed the mass and 3D mesh information to MeshLab to get the inertia matrix for the asset. Our prompts for querying GPT for mass and 3D object size can be found on our website. We wrap the generated mesh information, its semantic name, as well as the physical parameters into URDF files to be loaded into our simulator.
Our architecture is as follows:
Once we have the texture, geometry and physical parameters, we populate the URDF for use in simulations.
| Fruit/Vegetable | Mass (gram) | Length (cm) | Width | Height | |-----------------|-------------|-------------|-------|--------| | Papaya | 500-1000 | 15-20 | 10-15 | 10-15 | | Cucumber | 200-300 | 15-20 | 5-7 | 5-7 | | Watermelon | 5000-7000 | 30-40 | 20-30 | 20-30 | | Raspberry | 3-5 | 2-3 | 2-3 | 2-3 | | Coconut | 600-800 | 10-15 | 8-12 | 8-12 | | Corn | 50-100 | 10-15 | 8-12 | 8-12 | | Pumpkin | 2000-5000 | 20-40 | 20-40 | 20-40 | | Avocado | 150-250 | 10-12 | 6-8 | 4-5 |
3D asset generation from ours, RealFusion [43] and Make-It-3D [44]. We use a view and camera pose conditioned image generative model during score distillation, which helps generate more accurate 3D geometry in comparison to the baselines.
[1] Rui Chen et al. “Fantasia3D: Disentangling Geometry and Appearance for High-quality Text-to-3D Content Creation”. In: arXiv preprint arXiv:2303.13873 (2023).
[2] Chen-Hsuan Lin et al. “Magic3D: High-Resolution Text-to-3D Content Creation”. In: IEEE Conference on Com- puter Vision and Pattern Recognition (CVPR). 2023.
[3] Luke Melas-Kyriazi et al. “RealFusion: 360 Reconstruction of Any Object from a Single Image”. In: CVPR. 2023. URL: https://arxiv.org/abs/2302.10663.
[4] Ben Poole et al. “DreamFusion: Text-to-3D using 2D Diffusion”. In: arXiv (2022).
[5] Bokui Shen et al. GINA-3D: Learning to Generate Implicit Neural Assets in the Wild. 2023. arXiv: 2304.02163 [cs.CV].
[6] Junshu Tang et al. Make-It-3D: High-Fidelity 3D Creation from A Single Image with Diffusion Prior. 2023. arXiv: 2303.14184 [cs.CV].