Image-to-3D
Image-to-3D models take in image input and produce 3D output.
Result
image-to-3d-3d-output-filename.glb
About Image-to-3D
Use Cases
Image-to-3D models can be used in a wide variety of applications that require 3D, such as games, animation, design, architecture, engineering, marketing, and more.
Generating Meshes
Meshes are the standard representation of 3D in industry.
Generating Gaussian Splats
Gaussian Splatting is a rendering technique that represents scenes as fuzzy points.
Inference
Inference for this task typically leverages the Diffusers library for inference, using Custom Pipelines.
These are unstandardized and depend on the model. More details can be found in each model repository.
import torch
import requests
import numpy as np
from io import BytesIO
from diffusers import DiffusionPipeline
from PIL import Image
pipeline = DiffusionPipeline.from_pretrained(
"dylanebert/LGM-full",
custom_pipeline="dylanebert/LGM-full",
torch_dtype=torch.float16,
trust_remote_code=True,
).to("cuda")
input_url = "https://huggingface.co./datasets/dylanebert/iso3d/resolve/main/jpg@512/a_cat_statue.jpg"
input_image = Image.open(BytesIO(requests.get(input_url).content))
input_image = np.array(input_image, dtype=np.float32) / 255.0
result = pipeline("", input_image)
result_path = "/tmp/output.ply"
pipeline.save_ply(result, result_path)
In the code above, we:
- Import the necessary libraries
- Load the
LGM-full
model and custom pipeline - Load and preprocess the input image
- Run the pipeline on the input image
- Save the output to a file
Output Formats
Meshes can be in .obj
, .glb
, .stl
, or .gltf
format. Other formats are allowed, but won't be rendered in the gradio Model3D component.
Splats can be in .ply
or .splat
format. They can be rendered in the gradio Model3D component using the gsplat.js library.
Useful Resources
Compatible libraries
No example widget is defined for this task.
Note Contribute by proposing a widget for this task !
Note Fast image-to-3D mesh model by Tencent.
Note Fast image-to-3D mesh model by StabilityAI
Note A scaled up image-to-3D mesh model derived from TripoSR.
Note Generative 3D gaussian splatting model.
Note A large dataset of over 10 million 3D objects.
Note A dataset of isolated object images for evaluating image-to-3D models.
Note Leaderboard to evaluate image-to-3D models.
Note Image-to-3D demo with mesh outputs.
Note Image-to-3D demo with mesh outputs.
Note Image-to-3D demo with mesh outputs.
Note Image-to-3D demo with splat outputs.
No example metric is defined for this task.
Note Contribute by proposing a metric for this task !