Kaze-3D-v0.2
One image in, one 3D mesh out. A small image-to-3D model trained from scratch on a single RTX 3060 12 GB, written entirely in Rust on RustingBrain. No Python anywhere, in training or in use.
- More than twice as accurate as v0.1 on the same held-out objects (F@0.02 0.480 against 0.215)
- 3.4 seconds per mesh on an RTX 3060, about 2.1 GiB of card memory
- runs on the CPU too
- Apache-2.0 weights, trained only on CC-BY and CC0 data
Objects the model never saw: input image, true shape, Kaze's output. Chosen to show the range: the top four rows are among its best results of 64, the next two are above average, the last two are a typical and a weak one.
Still an early model. Kaze v0.2 gets the shape and size of most everyday objects right, and boxes, shoes and bowls often closely. It smooths sharp edges, misses small detail, and does badly on animals and figurines. It makes geometry only: no texture, no colour. See What to expect.
What changed since v0.1
- The image encoder is now DINOv2 ViT-B/14 instead of CLIP ViT-B/16. The flow model was fine-tuned to read its tokens.
- The flow model trained for 415,000 steps instead of 127,500.
- Same architecture, same shape VAE, same training data and licences.
- Held-out F@0.02 went from 0.215 to 0.480, IoU from 0.344 to 0.548, and the objects reaching our 0.55 target from 6 of 64 to 27 of 64.
Quick start
You need a Rust toolchain. For the GPU build you also need an NVIDIA card and the CUDA toolkit.
# 1. the runner
git clone https://github.com/RustingStudio/RustingBrain
git clone https://github.com/RustingStudio/RustingRunner
cd RustingRunner
cargo build --release --features cuda # leave out --features cuda for CPU
# 2. the weights, and the DINOv2 image encoder they need
hf download rusting-studio/Kaze-3D-v0.2 --local-dir Kaze-3D-v0.2
hf download facebook/dinov2-base model.safetensors --local-dir Kaze-3D-v0.2/dinov2-base
# 3. one image to one mesh
./target/release/rusting-runner 3d --weights Kaze-3D-v0.2 \
--image my-object.png --out my-object.glb --cuda 0
Leave out --cuda 0 to run on the CPU. Open the .glb in Blender or any
glTF viewer. More flags (--seed, --steps, --guidance, --faces) are in
the RustingRunner README.
The runner reads from flow.safetensors which image encoder the model needs.
An older RustingRunner knows only CLIP and asks for it: update it before using
v0.2.
Best input: one object, centred, on a plain or transparent background, seen slightly from above. 512ร512 is ideal; other sizes are resized.
What to expect
- The overall shape and size are usually right, and often closely so for boxes, packaging, shoes, bowls and other simple, solid objects.
- Sharp edges and corners come out rounded, and small detail (laces, cut-outs, thin rims) is often missing. Part of this comes from the shape VAE, which is unchanged since v0.1.
- Animals, figurines, toys made of many pieces and thin objects are the weakest: on these the output is often a rough blob.
- It was trained on renders of single objects. Photos, scenes and several objects in one image are outside what it has seen.
- Geometry only. The mesh has no texture and no colour.
How it works
| Part | Size | Role |
|---|---|---|
| Image encoder | DINOv2 ViT-B/14 at 196ร196, frozen, not in this repository | turns the image into 197 tokens |
| Flow transformer | 103,219,968 parameters | turns noise into a shape latent, guided by the image tokens |
| Shape VAE | 31,448,065 parameters | turns the latent into a signed distance field; marching tetrahedra give the mesh |
Measured quality
Measured on the RTX 3060 on Google Scanned Objects held out of training
(held-out-ids.txt, the same 64 objects and the same picture of each as for
v0.1). The true shape is scaled so its longest side spans [-1, 1], and the
output is scored as generated, with no alignment to the truth. F@0.02 is the
F-score at a distance of 1% of the longest side, on 50,000 points per
surface. Higher is better; 1.0 is a perfect match.
| Objects | F@0.02 | IoU | Our target (F@0.02) | |
|---|---|---|---|---|
| Shape VAE, reconstruction | 32 | 0.923 | 0.868 | 0.90, reached |
| Image to shape, v0.2, 28 steps, guidance 4 | 64 | 0.480 | 0.548 | 0.55, not yet reached |
| Image to shape, v0.1, same settings | 64 | 0.215 | 0.344 |
27 of the 64 objects reach 0.55 on their own (v0.1: 6), and none came out empty. Scores spread widely: from 0.999 for a small bottle to 0.047 for a figurine.
On 256 held-out Objaverse objects, which are further from the scans, v0.2 scores F@0.02 0.392 and IoU 0.435. These are scored against the stored surface samples of each object rather than its mesh, and 5 of the 256 near-empty outputs were sampled again with a new seed, which the runner does not do.
One generation takes 3.4 seconds on the RTX 3060, weight loading included (two warm runs, 3.37 s each; the first run after boot took 5.1 s). The image encoder runs on the CPU in both training and use.
Training data
112,364 objects, each rendered from 8 views:
- Google Scanned Objects, 1,031 scans, CC-BY 4.0.
- Objaverse, 111,333 objects: only those whose own licence is CC-BY 4.0 (110,699) or CC0 1.0 (634). Objects under non-commercial or share-alike licences were left out.
The shape VAE was trained on an earlier, smaller cut of the same corpus (53,688 objects, the same licences). The held-out scans were never trained on.
ATTRIBUTION.csv lists every Objaverse object used: id, title, author,
licence and source page. Objaverse: Deitke et al., "Objaverse: A Universe of
Annotated 3D Objects", CVPR 2023. Google Scanned Objects: Downs et al., ICRA
2022.
Training
- Shape VAE: 225,000 steps, batch 16, learning rate 2e-4 decaying to 2e-5. Unchanged since v0.1.
- Flow transformer, batch 32 throughout, averaged copy (EMA 0.9999) released:
- Steps 0 to 127,500 on CLIP tokens: v0.1.
- Steps 127,500 to 220,000 on CLIP tokens at learning rate 1e-4, with timesteps bent towards the noisy end (shift 3) and, from step 165,000, training Google scans filling 15% of every batch.
- Steps 220,000 to 385,000 on DINOv2 tokens, the same recipe.
- Steps 385,000 to 415,000: the learning rate cooled on a cosine from 1e-4 to 1e-5.
- About 460 to 490 ms a step. Hardware: one RTX 3060 12 GB.
Licence
Weights: Apache-2.0. The DINOv2 weights keep their own licence (Apache-2.0) and are not redistributed here.
