Skip to content

Commit e61894c

Browse files
adding bbox example. updating messaging (#24)
Co-authored-by: Jean-Philippe Fauconnier <jfauconnier@roblox.com>
1 parent f84f189 commit e61894c

File tree

4 files changed

+49
-17
lines changed

4 files changed

+49
-17
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
examples/bulldozer.obj filter=lfs diff=lfs merge=lfs -text
2+
examples/truck-bbox.gif filter=lfs diff=lfs merge=lfs -text
3+
examples/scenegen.gif filter=lfs diff=lfs merge=lfs -text

README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# Cube
22

33
<p align="center">
4-
<img src="./examples/green vintage couch.gif" width="200" height="200" style="margin: 5px;">
5-
<img src="./examples/purple sword.gif" width="200" height="200" style="margin: 5px;">
6-
<img src="./examples/unicorn.gif" width="200" height="200" style="margin: 5px;">
7-
<img src="./examples/whale.gif" width="200" height="200" style="margin: 5px;">
8-
<img src="./examples/red buggy.gif" width="200" height="200" style="margin: 5px;">
9-
<img src="./examples/bulldozer.gif" width="200" height="200" style="margin: 5px;">
10-
<img src="./examples/dragon.gif" width="200" height="200" style="margin: 5px;">
11-
<img src="./examples/boat.gif" width="200" height="200" style="margin: 5px;">
4+
<img src="./examples/green vintage couch.gif" width="150" height="150" style="margin: 5px;">
5+
<img src="./examples/purple sword.gif" width="150" height="150" style="margin: 5px;">
6+
<img src="./examples/unicorn.gif" width="150" height="150" style="margin: 5px;">
7+
<img src="./examples/whale.gif" width="150" height="150" style="margin: 5px;">
8+
<br />
9+
<img src="./examples/red buggy.gif" width="150" height="150" style="margin: 5px;">
10+
<img src="./examples/bulldozer.gif" width="150" height="150" style="margin: 5px;">
11+
<img src="./examples/dragon.gif" width="150" height="150" style="margin: 5px;">
12+
<img src="./examples/boat.gif" width="150" height="150" style="margin: 5px;">
1213
</p>
1314

14-
<div align="center">
15-
<a href=https://corp.roblox.com/newsroom/2025/03/introducing-roblox-cube target="_blank"><img src=https://img.shields.io/badge/Blog-000000.svg height=22px></a>
16-
<a href=https://huggingface.co/Roblox/cube3d-v0.1 target="_blank"><img src=https://img.shields.io/badge/%F0%9F%A4%97%20Models-d96902.svg height=22px></a>
17-
<a href= target="_blank"><img src=https://img.shields.io/badge/Report-b5212f.svg?logo=arxiv height=22px></a>
18-
</div>
15+
<p align="center">
16+
<a href=https://corp.roblox.com/newsroom/2025/03/introducing-roblox-cube target="_blank">Blog</a>&nbsp; |
17+
<a href=https://huggingface.co/Roblox/cube3d-v0.1 target="_blank">Models on Hugging Face</a>&nbsp; |
18+
<a href= target="_blank">Technical Report</a>
19+
</p>
20+
<br>
21+
22+
We are unlocking the power of generating 3D assets and enhancing creativity for all artists. Our latest version of Cube 3D is now accessible to individuals, creators, researchers and businesses of all sizes so that they can experiment, innovate and scale their ideas responsibly.
23+
24+
This release includes model weights and starting code for open source pre-trained text-to-shape model.
1925

2026
## Get Started with Cube3D
2127

@@ -31,7 +37,7 @@ source cube3d/bin/activate
3137
pip install -e .[meshlab]
3238
```
3339

34-
> **Cuda**: If you are using a Windows machine, you may need to install the [CUDA](https://developer.nvidia.com/cuda-downloads) toolkit as well as the torch with cuda support via `pip install torch --index-url https://download.pytorch.org/whl/cu124 --force-reinstall`
40+
> **CUDA**: If you are using a Windows machine, you may need to install the [CUDA](https://developer.nvidia.com/cuda-downloads) toolkit as well as the torch with cuda support via `pip install torch --index-url https://download.pytorch.org/whl/cu124 --force-reinstall`
3541
3642
> **Note**: The `[meshlab]` is an optional dependency and can be removed by simply running `pip install -e .` for better compatibility but mesh simplification will be disabled.
3743
@@ -52,7 +58,11 @@ huggingface-cli download Roblox/cube3d-v0.1 --local-dir ./model_weights
5258
To generate 3D models using the downloaded models simply run:
5359

5460
```bash
55-
python3 -m cube3d.generate --gpt-ckpt-path model_weights/shape_gpt.safetensors --shape-ckpt-path model_weights/shape_tokenizer.safetensors --prompt "sleek vintage green couch with clean lines and velvet material" --fast-inference
61+
python3 -m cube3d.generate \
62+
--gpt-ckpt-path model_weights/shape_gpt.safetensors \
63+
--shape-ckpt-path model_weights/shape_tokenizer.safetensors \
64+
--fast-inference \
65+
--prompt "sleek vintage green couch with clean lines and velvet material"
5666
```
5767

5868
The output will be an `.obj` file saved in the specified `output` directory.
@@ -67,14 +77,16 @@ and save it as `turntable.gif` in the specified `output` directory.
6777
To tokenize a 3D shape into token indices and reconstruct it back, you can use the following command:
6878

6979
```bash
70-
python3 -m cube3d.vq_vae_encode_decode --shape-ckpt-path model_weights/shape_tokenizer.safetensors --mesh-path ./outputs/output.obj
80+
python3 -m cube3d.vq_vae_encode_decode \
81+
--shape-ckpt-path model_weights/shape_tokenizer.safetensors \
82+
--mesh-path ./input_mesh.obj
7183
```
7284

7385
This will process the `.obj` file located at `./outputs/output.obj` and prints the tokenized representation as well as exports the mesh reconstructed from the token indices.
7486

7587
### Code Usage
7688

77-
We designed a minimalist API that allows you to use this repo as a Python library,
89+
We designed a minimalist API that allows you to use this repo as a Python library:
7890

7991
```python
8092
import torch
@@ -100,6 +112,18 @@ vertices, faces = mesh_v_f[0][0], mesh_v_f[0][1]
100112
trimesh.Trimesh(vertices=vertices, faces=faces).export("output.obj")
101113
```
102114

115+
## Coming Soon
116+
117+
Bounding box shape conditioning:
118+
<p align="center">
119+
<img src="./examples/truck-bbox.gif" width="200" height="200" style="margin: 5px;">
120+
</p>
121+
122+
Scene Generation:
123+
<p align="center">
124+
<img src="./examples/scenegen.gif" style="margin: 5px;">
125+
</p>
126+
103127
## Acknowledgements
104128

105129
We would like to thank the contributors to [TRELLIS](https://github.com/microsoft/TRELLIS), [CraftsMan3D](https://github.com/wyysf-98/CraftsMan3D), [threestudio](https://github.com/threestudio-project/threestudio), [Hunyuan3D-2](https://github.com/Tencent/Hunyuan3D-2), [minGPT](https://github.com/karpathy/minGPT), [dinov2](https://github.com/facebookresearch/dinov2), [OptVQ](https://github.com/zbr17/OptVQ), [1d-tokenizer](https://github.com/bytedance/1d-tokenizer)

examples/scenegen.gif

Lines changed: 3 additions & 0 deletions
Loading

examples/truck-bbox.gif

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)