Spaces:
Runtime error
Runtime error
## APIs: | |
<details> | |
<summary>We offer handy APIs for our pipeline and its components.</summary> | |
```python | |
from gradio_client import Client | |
client = Client("https://one-2-3-45-one-2-3-45.hf.space/") | |
input_img_path = "https://huggingface.co/spaces/One-2-3-45/One-2-3-45/resolve/main/demo_examples/01_wild_hydrant.png" | |
### Single image to 3D mesh | |
generated_mesh_filepath = client.predict( | |
input_img_path, | |
True, # image preprocessing | |
api_name="/generate_mesh" | |
) | |
### Elevation estimation | |
# DON'T TO ASK USERS TO ESTIMATE ELEVATION! This OFF-THE-SHELF algorithm is ALL YOU NEED! | |
elevation_angle_deg = client.predict( | |
input_img_path, | |
True, # image preprocessing | |
api_name="/estimate_elevation" | |
) | |
### Image preprocessing: segment, rescale, and recenter | |
segmented_img_filepath = client.predict( | |
input_img_path, | |
api_name="/preprocess" | |
) | |
``` | |
</details> | |
## Tuning Tips: | |
1. The multi-view prediction module (Zero123) operates probabilistically. If some of the predicted views are not satisfactory, you may select and regenerate them. | |
2. In “advanced options”, you can tune two parameters as in other common diffusion models: | |
- Diffusion Guidance Scale determines how much you want the model to respect the input information (input image + viewpoints). Increasing the scale typically results in better adherence, less diversity, and also higher image distortion. | |
- Number of diffusion inference steps controls the number of diffusion steps applied to generate each image. Generally, a higher value yields better results but with diminishing returns. | |
Enjoy creating your 3D asset! |