introvoyz041/Zero-To-CAD-Qwen3-VL-2B
04
<p align="center"> <img src="assets/logo.png" alt="Zero-to-CAD" width="100%"/> </p>
Zero-to-CAD โ Qwen3-VL-2B
A vision-language model fine-tuned to reconstruct executable CAD programs from multi-view images.
<p align="center"> <img src="assets/agentic.png" alt="Zero-to-CAD agentic synthesis pipeline" width="800"/> </p>
Zero-to-CAD: Agentic Synthesis of Interpretable CAD Programs at Million-Scale Without Real Data Mohammadmehdi Ataei, Farzaneh Askari, Kamal Rahimi Malekshan, Pradeep Kumar Jayaraman Autodesk Research
Related Resources
Model Description
This model is a fully fine-tuned Qwen3-VL-2B-Instruct that takes 8 rendered views of a 3D shape (4 front, 4 rear at 256ร256) and generates executable CadQuery Python code that reproduces the geometry.
The model was trained entirely on synthetic data from Zero-to-CAD 1M (979,633 training samples) โ no real-world CAD files were used.
Key Results
Comparison with Baselines
Quick Start
Inference
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from datasets import load_dataset
from PIL import Image
import io
model_name = "ADSKAILab/Zero-To-CAD-Qwen3-VL-2B"
model = Qwen3VLForConditionalGeneration.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
processor = AutoProcessor.from_pretrained(model_name)
# Load 8 rendered views from the dataset
ds = load_dataset("ADSKAILab/Zero-To-CAD-1m", split="train", streaming=True)
sample = next(iter(ds))
views = [
Image.open(io.BytesIO(sample[f"image_{i}"])) if isinstance(sample[f"image_{i}"], bytes)
else sample[f"image_{i}"]
for i in range(8)
]
# Or load 8 views from local files:
# views = [Image.open(f"view_{i}.png") for i in range(8)]
messages = [
{
"role": "system",
"content": "You are a CAD code assistant. Given multiple rendered views of a 3D shape, generate clean, well-structured CadQuery Python code that accurately reproduces the geometry."
},
{
"role": "user",
"content": [
*[{"type": "image", "image": view} for view in views],
{"type": "text", "text": "Generate CadQuery code for this shape."}
]
}
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=text, images=views, return_tensors="pt").to(model.device)
output_ids = model.generate(**inputs, max_new_tokens=4096)
output_text = processor.batch_decode(output_ids[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)[0]
print(output_text)Execute the generated code
import cadquery as cq
exec(output_text)
# `result` contains the reconstructed CadQuery solid
# Export
cq.exporters.export(result, "output.step")
cq.exporters.export(result, "output.stl")Training Details
Evaluation Protocol
- Metric: Voxelized IoU at 64ยณ resolution between generated and ground-truth solids
- Rotational alignment: Maximum IoU over 45ยฐ rotation increments
- Success rate: Percentage of generations producing valid, executable CadQuery code
Intended Uses
- Image-to-CAD reconstruction โ reconstruct editable parametric CAD from rendered views
- Research baseline โ starting point for Image-to-Sequence CAD generation research
- Integration โ combine with rendering pipelines for end-to-end 3D reconstruction
Limitations
- Trained on synthetic data only; may struggle with photorealistic or noisy inputs
- Expects 8 clean rendered views at 256ร256 โ other configurations are untested
- Outputs CadQuery code only; other CAD formats require post-processing
- Complex multi-part assemblies may exceed the 4,096 token context window
Citation
If you use this model, please cite:
@misc{ataei2026zerotocadagenticsynthesisinterpretable,
title={Zero-to-CAD: Agentic Synthesis of Interpretable CAD Programs at Million-Scale Without Real Data},
author={Mohammadmehdi Ataei and Farzaneh Askari and Kamal Rahimi Malekshan and Pradeep Kumar Jayaraman},
year={2026},
eprint={2604.24479},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2604.24479}
}License
This model is released under the Apache License 2.0.
