five

Zero-To-CAD-1m

收藏
魔搭社区2026-05-21 更新2026-05-24 收录
下载链接:
https://modelscope.cn/datasets/ADSKAILab/Zero-To-CAD-1m
下载链接
链接失效反馈
官方服务:
资源简介:
<p align="center"> <img src="assets/logo.png" alt="Zero-to-CAD" width="100%"/> </p> # Zero-to-CAD 1M **One million executable, interpretable CAD construction sequences synthesized entirely without real-world data.** <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](https://orcid.org/0000-0002-3399-9696), [Farzaneh Askari](https://orcid.org/0000-0003-0684-1102), [Kamal Rahimi Malekshan](https://orcid.org/0009-0004-1192-4724), [Pradeep Kumar Jayaraman](https://orcid.org/0000-0001-6314-6136) > > Autodesk Research ## Related Resources | Resource | Link | |----------|------| | 📄 **Paper** | [Zero-to-CAD: Agentic Synthesis of Interpretable CAD Programs at Million-Scale Without Real Data](https://arxiv.org/abs/2604.24479) | | 📦 **Zero-to-CAD 1M** (this dataset) | You are here | | 📦 **Zero-to-CAD 100K** (curated subset) | [ADSKAILab/Zero-To-CAD-100k](https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-100k) | | 🤖 **Fine-tuned Model** (Qwen3-VL-2B) | [ADSKAILab/Zero-To-CAD-Qwen3-VL-2B](https://huggingface.co/ADSKAILab/Zero-To-CAD-Qwen3-VL-2B) | | 🗂️ **Collection** | [ADSKAILab/Zero-To-CAD](https://huggingface.co/collections/ADSKAILab/zero-to-cad) | ## Overview Zero-to-CAD is a large-scale dataset of **1,000,000 executable CAD construction sequences** generated by an LLM operating inside a feedback-driven CAD environment. Unlike prior datasets limited to sketch-and-extrude workflows, Zero-to-CAD covers a **broad vocabulary of CAD operations** including booleans, fillets, chamfers, shells, lofts, sweeps, and patterns. Each sample is: - ✅ **Executable** — valid CadQuery Python code that runs and produces geometry - ✅ **Interpretable** — named parameters, logical construction order, human-readable code - ✅ **Geometrically validated** — multi-stage validation (topology, contiguity, complexity, export) ### How It Was Made We frame CAD synthesis as an **agentic search problem**: an LLM is placed in a loop with a CadQuery execution environment and equipped with three tools: 1. **`execute_and_validate`** — runs code, checks geometric validity, returns structured feedback 2. **`lookup_documentation`** — TF-IDF retrieval over CadQuery API docs 3. **`grep_documentation`** — regex-based precise syntax lookup The agent iteratively generates, executes, and repairs code across multiple turns until validation succeeds. A two-stage protocol first generates diverse part descriptions (65 categories), then synthesizes executable code for each. <p align="center"> <img src="assets/samples.png" alt="Sample CAD models from Zero-to-CAD" width="100%"/> </p> ## Dataset Details ### Generation Statistics | Metric | Value | |--------|-------| | Total sequences | 999,633 | | Total tokens processed | 60.2B | | Generated tokens per design (mean / median) | 5,638 / 5,089 | | Function calls per conversation (mean) | 4.34 | | Zero-shot success rate | 22.3% | | Attempts before success (mean / median) | 3.30 / 3 | | Minimum B-Rep face count | 7 | ### Splits | Split | Samples | |-------|---------| | Train | 979,633 | | Validation | 10,000 | | Test | 10,000 | ### Data Fields Each sample contains: | Field | Type | Description | |-------|------|-------------| | `uuid` | `string` | Unique identifier (deterministic, derived from content hash) | | `cadquery_file` | `string` | Executable CadQuery Python source code | | `num_faces` | `int` | Number of B-Rep faces in the final solid | | `face_latency_ms` | `float` | Time to compute face count (ms) | | `cadquery_ops_json` | `string` | JSON list of CAD operations used (e.g., extrude, fillet, chamfer) | | `cadquery_ops_count` | `int` | Number of CAD operations in the construction sequence | | `ops_latency_ms` | `float` | Time to extract operations (ms) | | `num_renders` | `int` | Number of rendered views | | `image_0` – `image_7` | `image` | 8 rendered views (256×256, 4 front + 4 rear) | | `stl_file` | `bytes` | Exported STL mesh | | `step_file` | `bytes` | Exported STEP file | ### CAD Operations Coverage The dataset covers a broad set of operations far beyond sketch-and-extrude: - **Sketch primitives**: rect, circle, polygon, arc, spline, slot - **3D operations**: extrude, cut, revolve, loft, sweep - **Modifications**: fillet, chamfer, shell, offset - **Booleans**: union, cut, intersect - **Patterns**: linear patterns, polar patterns, mirror - **Features**: holes (through, blind, countersink), threads, ribs ### Part Categories 65 categories spanning structural components (brackets, gusset plates), rotational elements (pulleys, flywheels), enclosures (housings, covers), fastening hardware (clamps, spacers), and more. ## Comparison with Existing Datasets | Dataset | Year | Size | Replayable | Readable | Operations | |---------|------|------|------------|----------|------------| | DeepCAD | 2021 | 178K | ✅ | ✅ | Sketch, Extrude | | Fusion 360 Gallery | 2021 | 8.6K | ✅ | ✅ | Sketch, Extrude | | CC3D-Ops | 2022 | 37K+ | ❌ | ❌ | Extrude/Cut, Revolve, Fillet, Chamfer (labels only) | | CAD-Recode | 2025 | 1M | ✅ | ❌ | Sketch, Extrude | | **Zero-to-CAD (ours)** | **2026** | **1M** | **✅** | **✅** | **Broad** (booleans, fillets, chamfers, lofts, sweeps, shells, etc.) | ## Quick Start ### Load the dataset The train split contains ~1M rows, so use streaming to avoid downloading the entire dataset at once: ```python from datasets import load_dataset # Streaming mode — rows are fetched on demand ds = load_dataset("ADSKAILab/Zero-To-CAD-1m", split="train", streaming=True) sample = next(iter(ds)) # Get a single sample sample = next(iter(ds)) # Display the reconstructed script cad_code = bytes(sample["cadquery_file"]).decode("utf-8") print(cad_code) ``` To load a smaller split entirely into memory: ```python ds = load_dataset("ADSKAILab/Zero-To-CAD-1m", split="test") sample = ds[0] ``` ### Execute a sample ```python import cadquery as cq # Streaming mode — rows are fetched on demand ds = load_dataset("ADSKAILab/Zero-To-CAD-1m", split="train", streaming=True) sample = next(iter(ds)) # Execute the code from a sample code = bytes(sample["cadquery_file"]).decode("utf-8") exec(code) # Display generated CadQuery solid from IPython.display import display display(result) ``` ### Visualize renders ```python for i in range(8): img = sample[f"image_{i}"] img.save(f"view_{i}.png") ``` ## Embeddings & FAISS Index Precomputed DINOv3 visual embeddings and a FAISS IVF-PQ index are provided for nearest-neighbor search over the full dataset. Each embedding is the mean-pooled DINOv3 feature across 8 rendered views of a CAD model. | File | Size | Description | |------|------|-------------| | `embeddings/cad_gen_embeddings.npy` | 1.54 GB | DINOv3 embeddings (999,633 × 384, float32) | | `embeddings/cad_gen_ivfpq.index` | 97.7 MB | FAISS IVF-PQ index for approximate nearest-neighbor search | | `cad_gen_uuids.txt` | 37 MB | Row-index → item ID mapping (999,632 IDs) | | `embeddings/cad_gen_neighbors_ivfpq.csv` | 1.73 GB | Precomputed 20 nearest neighbors for every sample | | `embeddings/cad_gen_diverse_samples.csv` | 7.74 MB | 100K diverse subset selection metadata (cluster assignments) | ### Search for similar models ```python import faiss import numpy as np from huggingface_hub import hf_hub_download # Download index and ID mapping index_path = hf_hub_download("ADSKAILab/Zero-To-CAD-1m", "embeddings/cad_gen_ivfpq.index", repo_type="dataset") ids_path = hf_hub_download("ADSKAILab/Zero-To-CAD-1m", "embeddings/cad_gen_uuids.txt", repo_type="dataset") index = faiss.read_index(index_path) item_ids = open(ids_path).read().splitlines() # Query with your own embedding (384-d float32) query = np.random.rand(1, 384).astype("float32") # replace with your embedding distances, indices = index.search(query, k=10) for rank, (dist, idx) in enumerate(zip(distances[0], indices[0]), 1): print(f"{rank}. {item_ids[idx]} (distance: {dist:.4f})") ``` ### Load precomputed neighbors ```python import pandas as pd from huggingface_hub import hf_hub_download path = hf_hub_download("ADSKAILab/Zero-To-CAD-1m", "embeddings/cad_gen_neighbors_ivfpq.csv", repo_type="dataset") neighbors = pd.read_csv(path) # Columns: item_id, neighbor_id, score, rank ``` ## Example ```python import cadquery as cq plate_length = 60.0 plate_width = 40.0 plate_thickness = 8.0 rib_length = 20.0 rib_width = 6.0 hole_diameter = 8.0 mount_hole_dia = 3.0 fillet_radius = 2.0 chamfer_distance = 1.0 slot_width = 4.0 slot_length = 30.0 base = ( cq.Workplane('XY') .rect(plate_length, plate_width, centered=True) .extrude(plate_thickness) ) base = base.edges("|Z").fillet(fillet_radius) rib = ( cq.Workplane('XY') .center(-plate_length/2 + rib_length/2, 0) .rect(rib_length, rib_width, centered=True) .extrude(plate_thickness) ) bracket = base.union(rib) bracket = bracket.cut( cq.Workplane('XY').center(0, 0) .circle(hole_diameter/2).extrude(plate_thickness + 2) ) bracket = bracket.edges("|Z").chamfer(chamfer_distance) result = bracket ``` ## Intended Uses - **Training CAD sequence models** — learn to generate parametric construction histories - **Image-to-CAD reconstruction** — reconstruct editable CAD from multi-view images - **CAD program understanding** — study the structure and semantics of construction sequences - **Benchmarking** — evaluate generative CAD models on diverse, validated geometry ## Limitations - All data is synthetically generated; no real-world CAD files were used - The LLM may produce locally plausible but globally incoherent designs in some cases - Scale conventions (max 100 units) may not match specific engineering standards - Operation distribution reflects LLM priors, not real-world manufacturing frequency ## Citation If you use this dataset, please cite: ```bibtex @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 dataset is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).

<p align="center"> <img src="assets/logo.png" alt="Zero-to-CAD" width="100%"/> </p> # Zero-to-CAD 1M **完全不依赖真实世界数据生成的100万条可执行、可解释的CAD构建序列。** <p align="center"> <img src="assets/agentic.png" alt="Zero-to-CAD 智能体合成流水线" width="800"/> </p> > **Zero-to-CAD:无需真实数据的百万级可解释CAD程序智能体合成** > > [Mohammadmehdi Ataei](https://orcid.org/0000-0002-3399-9696), [Farzaneh Askari](https://orcid.org/0000-0003-0684-1102), [Kamal Rahimi Malekshan](https://orcid.org/0009-0004-1192-4724), [Pradeep Kumar Jayaraman](https://orcid.org/0000-0001-6314-6136) > > Autodesk Research(欧特克研究院) ## 相关资源 | 资源类型 | 链接 | |----------|------| | 📄 **论文** | [Zero-to-CAD: Agentic Synthesis of Interpretable CAD Programs at Million-Scale Without Real Data](https://arxiv.org/abs/2604.24479) | | 📦 **Zero-to-CAD 1M**(本数据集) | 您当前所在位置 | | 📦 **Zero-to-CAD 100K**(精选子集) | [ADSKAILab/Zero-To-CAD-100k](https://huggingface.co/datasets/ADSKAILab/Zero-To-CAD-100k) | | 🤖 **微调模型**(Qwen3-VL-2B) | [ADSKAILab/Zero-To-CAD-Qwen3-VL-2B](https://huggingface.co/ADSKAILab/Zero-To-CAD-Qwen3-VL-2B) | | 🗂️ **数据集合集** | [ADSKAILab/Zero-To-CAD](https://huggingface.co/collections/ADSKAILab/zero-to-cad) | ## 数据集概览 Zero-to-CAD是一个包含**100万条可执行CAD构建序列**的大规模数据集,由在反馈驱动的CAD环境中运行的大语言模型(LLM/Large Language Model)生成。与以往仅局限于草图拉伸工作流的数据集不同,Zero-to-CAD涵盖了**丰富的CAD操作词库**,包括布尔运算、圆角、倒角、抽壳、放样、扫掠以及阵列等操作。 每条样本均具备以下特性: - ✅ **可执行** —— 合法的CadQuery Python代码,可运行并生成几何模型 - ✅ **可解释** —— 带有命名参数、逻辑构建顺序以及人类可读的代码 - ✅ **几何验证** —— 经过多阶段验证(拓扑、连续性、复杂度、导出性) ### 数据集构建流程 我们将CAD合成建模为**智能体搜索问题**:将大语言模型置于与CadQuery执行环境的闭环中,并为其配备三类工具: 1. **`execute_and_validate`** —— 运行代码、检查几何合法性并返回结构化反馈 2. **`lookup_documentation`** —— 基于TF-IDF检索CadQuery API文档 3. **`grep_documentation`** —— 基于正则表达式的精确语法查找 该智能体经过多轮迭代,持续生成、执行并修复代码,直至验证通过。我们采用两阶段流程:首先生成多样化的零件描述(共65个类别),随后为每个描述合成可执行代码。 <p align="center"> <img src="assets/samples.png" alt="Zero-to-CAD 示例CAD模型" width="100%"/> </p> ## 数据集详情 ### 生成统计指标 | 指标 | 数值 | |--------|-------| | 总序列数 | 999,633 | | 处理总Token数 | 602亿 | | 单设计生成Token数(均值/中位数) | 5638 / 5089 | | 单会话函数调用次数(均值) | 4.34 | | 零样本(Zero-shot)成功率 | 22.3% | | 成功前的尝试次数(均值/中位数) | 3.30 / 3 | | 最小B-Rep面数 | 7 | ### 数据集划分 | 划分集 | 样本数量 | |-------|---------| | 训练集 | 979,633 | | 验证集 | 10,000 | | 测试集 | 10,000 | ### 数据字段说明 每条样本包含以下字段: | 字段名 | 数据类型 | 描述 | |-------|------|-------------| | `uuid` | 字符串 | 唯一标识符(由内容哈希生成,具有确定性) | | `cadquery_file` | 字符串 | 可执行的CadQuery Python源代码 | | `num_faces` | 整数 | 最终实体的B-Rep面数 | | `face_latency_ms` | 浮点数 | 计算面数的耗时(单位:毫秒) | | `cadquery_ops_json` | 字符串 | 所用CAD操作的JSON列表(例如拉伸、圆角、倒角) | | `cadquery_ops_count` | 整数 | 构建序列中的CAD操作数量 | | `ops_latency_ms` | 浮点数 | 提取操作的耗时(单位:毫秒) | | `num_renders` | 整数 | 渲染视图的数量 | | `image_0` – `image_7` | 图像 | 8张渲染视图(分辨率256×256,4个前视图+4个后视图) | | `stl_file` | 字节 | 导出的STL网格文件 | | `step_file` | 字节 | 导出的STEP文件 | ### CAD操作覆盖范围 本数据集涵盖了远超草图拉伸工作流的丰富操作类型: - **草图图元**:矩形、圆形、多边形、圆弧、样条曲线、槽 - **三维操作**:拉伸、切除、旋转、放样、扫掠 - **修改操作**:圆角、倒角、抽壳、偏移 - **布尔运算**:并集、差集、交集 - **阵列操作**:线性阵列、极坐标阵列、镜像 - **特征类型**:孔(通孔、盲孔、沉孔)、螺纹、加强筋 ### 零件类别 共65个类别,涵盖结构件(支架、连接板)、回转元件(滑轮、飞轮)、外壳(壳体、盖板)、紧固件(夹具、垫片)等多种类型。 ## 与现有数据集的对比 | 数据集 | 发布年份 | 规模 | 可复现 | 可读 | 操作覆盖范围 | |---------|------|------|------------|----------|------------| | DeepCAD | 2021 | 17.8万 | ✅ | ✅ | 草图、拉伸 | | Fusion 360 Gallery | 2021 | 8.6K | ✅ | ✅ | 草图、拉伸 | | CC3D-Ops | 2022 | 3.7万+ | ❌ | ❌ | 拉伸/切除、旋转、圆角、倒角(仅标签) | | CAD-Recode | 2025 | 100万 | ✅ | ❌ | 草图、拉伸 | | **Zero-to-CAD(本数据集)** | **2026** | **100万** | **✅** | **✅** | **丰富多样**(布尔运算、圆角、倒角、放样、扫掠、抽壳等) | ## 快速入门 ### 加载数据集 训练集包含约100万条数据,建议使用流式加载以避免一次性下载全部数据集: python from datasets import load_dataset # 流式加载模式 —— 按需获取数据行 ds = load_dataset("ADSKAILab/Zero-To-CAD-1m", split="train", streaming=True) sample = next(iter(ds)) # 获取单条样本 sample = next(iter(ds)) # 展示重构的代码脚本 cad_code = bytes(sample["cadquery_file"]).decode("utf-8") print(cad_code) 若要将较小的划分集完整加载到内存中: python ds = load_dataset("ADSKAILab/Zero-To-CAD-1m", split="test") sample = ds[0] ### 执行样本代码 python import cadquery as cq # 流式加载模式 —— 按需获取数据行 ds = load_dataset("ADSKAILab/Zero-To-CAD-1m", split="train", streaming=True) sample = next(iter(ds)) # 执行样本中的代码 code = bytes(sample["cadquery_file"]).decode("utf-8") exec(code) # 展示生成的CadQuery实体 from IPython.display import display display(result) ### 可视化渲染视图 python for i in range(8): img = sample[f"image_{i}"] img.save(f"view_{i}.png") ## 嵌入向量与FAISS索引 我们提供了预计算的DINOv3视觉嵌入向量以及FAISS IVF-PQ索引,用于在全数据集上执行最近邻搜索。每条嵌入向量为CAD模型8张渲染视图的均值池化DINOv3特征。 | 文件路径 | 大小 | 描述 | |------|------|-------------| | `embeddings/cad_gen_embeddings.npy` | 1.54 GB | DINOv3嵌入向量(999,633 × 384,float32格式) | | `embeddings/cad_gen_ivfpq.index` | 97.7 MB | FAISS IVF-PQ近似最近邻搜索索引 | | `cad_gen_uuids.txt` | 37 MB | 行索引→项目ID映射(共999,632个ID) | | `embeddings/cad_gen_neighbors_ivfpq.csv` | 1.73 GB | 每条样本的预计算20个最近邻 | | `embeddings/cad_gen_diverse_samples.csv` | 7.74 MB | 10万条多样化子集的选择元数据(聚类分配信息) | ### 搜索相似模型 python import faiss import numpy as np from huggingface_hub import hf_hub_download # 下载索引和ID映射文件 index_path = hf_hub_download("ADSKAILab/Zero-To-CAD-1m", "embeddings/cad_gen_ivfpq.index", repo_type="dataset") ids_path = hf_hub_download("ADSKAILab/Zero-To-CAD-1m", "embeddings/cad_gen_uuids.txt", repo_type="dataset") index = faiss.read_index(index_path) item_ids = open(ids_path).read().splitlines() # 使用自定义嵌入向量进行查询(384维float32格式) query = np.random.rand(1, 384).astype("float32") # 替换为您的嵌入向量 distances, indices = index.search(query, k=10) for rank, (dist, idx) in enumerate(zip(distances[0], indices[0]), 1): print(f"{rank}. {item_ids[idx]} (距离: {dist:.4f})") ### 加载预计算的最近邻结果 python import pandas as pd from huggingface_hub import hf_hub_download path = hf_hub_download("ADSKAILab/Zero-To-CAD-1m", "embeddings/cad_gen_neighbors_ivfpq.csv", repo_type="dataset") neighbors = pd.read_csv(path) # 列名:item_id, neighbor_id, score, rank ## 代码示例 python import cadquery as cq # 底板尺寸 plate_length = 60.0 plate_width = 40.0 plate_thickness = 8.0 # 加强筋尺寸 rib_length = 20.0 rib_width = 6.0 # 安装孔尺寸 hole_diameter = 8.0 mount_hole_dia = 3.0 # 圆角半径 fillet_radius = 2.0 # 倒角距离 chamfer_distance = 1.0 # 槽尺寸 slot_width = 4.0 slot_length = 30.0 base = ( cq.Workplane('XY') .rect(plate_length, plate_width, centered=True) .extrude(plate_thickness) ) base = base.edges("|Z").fillet(fillet_radius) rib = ( cq.Workplane('XY') .center(-plate_length/2 + rib_length/2, 0) .rect(rib_length, rib_width, centered=True) .extrude(plate_thickness) ) bracket = base.union(rib) bracket = bracket.cut( cq.Workplane('XY').center(0, 0) .circle(hole_diameter/2).extrude(plate_thickness + 2) ) bracket = bracket.edges("|Z").chamfer(chamfer_distance) result = bracket ## 预期应用场景 - **训练CAD序列模型** —— 学习生成参数化构建历史 - **图像到CAD重建** —— 从多视图图像重建可编辑的CAD模型 - **CAD程序理解** —— 研究构建序列的结构与语义 - **模型基准测试** —— 在多样化且经过验证的几何模型上评估生成式CAD模型 ## 局限性说明 - 所有数据均为合成生成,未使用任何真实CAD文件 - 大语言模型可能在部分场景中生成局部合理但全局不一致的设计 - 尺寸规范(最大100单位)可能不符合特定工程标准 - 操作分布反映了大语言模型的先验知识,而非真实世界的制造使用频率 ## 引用格式 若您使用本数据集,请引用以下文献: bibtex @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} } ## 开源协议 本数据集遵循[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)协议发布。
提供机构:
maas
创建时间:
2026-05-07
搜集汇总
数据集介绍
main_image_url
背景与挑战
背景概述
Zero-To-CAD-1m是一个包含100万个可执行、可解释的CAD构造序列的大规模数据集,完全基于合成数据生成。它通过LLM驱动的代理方法,在反馈驱动的CAD环境中生成,覆盖了广泛的CAD操作,如布尔运算、倒角和扫掠等,并经过多阶段几何验证。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务