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
+
- image-to-3d
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- CAD
|
| 10 |
+
- code-generation
|
| 11 |
---
|
| 12 |
+
# CADFS Dataset
|
| 13 |
+
|
| 14 |
+
<div align="center">
|
| 15 |
+
|
| 16 |
+
<p style="font-size:36px;">CADFS: A Big CAD Program Dataset and Framework for Computer-Aided Design with Large Language Models</p>
|
| 17 |
+
<div style="display: flex; justify-content: center; gap: 10px;">
|
| 18 |
+
<a href="https://voyleg.github.io/cadfs/" style="display:inline-block;background:#212121;color:white;padding:6px 18px;border-radius:999px;text-decoration:none;font-family:'Segoe UI','Helvetica Neue',Arial,sans-serif;">🚀 Project Page</a>
|
| 19 |
+
<a href="https://github.com/VladPyatov/CADFS" style="display:inline-block;background:#212121;color:white;padding:6px 18px;border-radius:999px;text-decoration:none;font-family:'Segoe UI','Helvetica Neue',Arial,sans-serif;">💻 Code</a>
|
| 20 |
+
<a href="https://huggingface.co/VladPyatov/CADFS-2B" style="display:inline-block;background:#212121;color:white;padding:6px 18px;border-radius:999px;text-decoration:none;font-family:'Segoe UI','Helvetica Neue',Arial,sans-serif;">🤗 Model</a>
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
</div>
|
| 24 |
+
|
| 25 |
+
<br>
|
| 26 |
+
|
| 27 |
+
A large-scale dataset for **parametric CAD model generation** from text descriptions and multi-view images. Models are represented as [FeatureScript](https://cad.onshape.com/FsDoc/) programs, enabling direct import into Onshape environment.
|
| 28 |
+
|
| 29 |
+
This dataset was used to train and evaluate **[CADFS](https://huggingface.co/VladPyatov/CADFS-2B)**, a fine-tuned Qwen2-VL-2B multimodal language model for text-to-CAD and image-to-CAD generation.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## Data Description
|
| 34 |
+
|
| 35 |
+
### `dataset/` — Processed Data
|
| 36 |
+
|
| 37 |
+
| File | Description |
|
| 38 |
+
|------|-------------|
|
| 39 |
+
| `featurescript_fp.zip` | Full-precision processed FeatureScript programs. |
|
| 40 |
+
| `featurescript_rp.zip` | Used in training and evaluation. Reduced-precision variant with floating-point values rounded to 2 decimal places. Produces a more compact token representation suitable for language model training. Note that rounding may break compilability for some models, while others are only compilable in reduced precision. |
|
| 41 |
+
| `text_annotations.zip` | Natural language annotations describing the geometry, topology, and design intent of each model, obtained with GPT-OSS-120b. |
|
| 42 |
+
| `step.zip` | STEP files with B-rep geometry. Rendered from `featurescript_fp.zip` where possible, or `featurescript_rp.zip` otherwise. |
|
| 43 |
+
|
| 44 |
+
### `raw/` — Raw Source Data
|
| 45 |
+
|
| 46 |
+
Source data used to create the processed FeatureScript representation.
|
| 47 |
+
|
| 48 |
+
| File | Description |
|
| 49 |
+
|------|-------------|
|
| 50 |
+
| `featurescript_raw.zip` | Unprocessed FeatureScript programs. |
|
| 51 |
+
| `sketch_raw.zip` | Sketch metadata extracted from FeatureScript feature trees. |
|
| 52 |
+
| `step_abc.zip` | STEP files extracted from the ABC dataset, used in both training and evaluation. |
|
| 53 |
+
| `multiview_images_abc.zip` | Multi-view images rendered from `step_abc.zip`, used in both training and evaluation. |
|
| 54 |
+
|
| 55 |
+
### `test_data/` — Evaluation Benchmarks
|
| 56 |
+
|
| 57 |
+
Minimal data required to perform evaluation, without the need to download the full dataset. A `.json` metadata file and a `.zip` archive are provided for each benchmark:
|
| 58 |
+
|
| 59 |
+
| Benchmark | Contents |
|
| 60 |
+
|-----------|----------|
|
| 61 |
+
| **CADFS** | jsonl, fs, annotations, images, step |
|
| 62 |
+
| **DeepCAD** | jsonl, fs, annotations, images, step |
|
| 63 |
+
| **CADParser** | jsonl, images, step |
|
| 64 |
+
|
| 65 |
+
### `train_data/` — Training Splits
|
| 66 |
+
|
| 67 |
+
Training data is split into two stages following the CADFS two-stage fine-tuning strategy, and two input modalities each:
|
| 68 |
+
|
| 69 |
+
| File | Stage | Modality | Description |
|
| 70 |
+
|------|-------|----------|-------------|
|
| 71 |
+
| `stage1_txt_train.jsonl` | Stage 1 | Text | Pre-training on text-to-FeatureScript generation |
|
| 72 |
+
| `stage1_img_train.jsonl` | Stage 1 | Image | Pre-training on image-to-FeatureScript generation |
|
| 73 |
+
| `stage2_txt_train.jsonl` | Stage 2 | Text | Fine-tuning with high-quality curated text pairs |
|
| 74 |
+
| `stage2_img_train.jsonl` | Stage 2 | Image | Fine-tuning with high-quality curated image-program pairs |
|
| 75 |
+
|
| 76 |
+
For training and evaluation we use `.jsonl` data format. Each `.jsonl` line follows the format:
|
| 77 |
+
|
| 78 |
+
**Image input:**
|
| 79 |
+
```json
|
| 80 |
+
{
|
| 81 |
+
"messages": [
|
| 82 |
+
{
|
| 83 |
+
"role": "system",
|
| 84 |
+
"content": "You are CAD code generation model."
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"role": "user",
|
| 88 |
+
"content": "<image>Generate a CAD model using FeatureScript framework..."
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"role": "assistant",
|
| 92 |
+
"content": "FeatureScript 1511;\n..."
|
| 93 |
+
}
|
| 94 |
+
],
|
| 95 |
+
"images": ["path/to/0085/00858269.png"],
|
| 96 |
+
"cad_file_id": "00858269"
|
| 97 |
+
}
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
**Text input:**
|
| 101 |
+
```json
|
| 102 |
+
{
|
| 103 |
+
"messages": [
|
| 104 |
+
{
|
| 105 |
+
"role": "system",
|
| 106 |
+
"content": "You are CAD code generation model."
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"role": "user",
|
| 110 |
+
"content": "Step 1 - Sketch\nCreate a new sketch on the default top plane..."
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"role": "assistant",
|
| 114 |
+
"content": "FeatureScript 1511;\n..."
|
| 115 |
+
}
|
| 116 |
+
],
|
| 117 |
+
"cad_file_id": "00858269"
|
| 118 |
+
}
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
---
|
| 122 |
+
|
| 123 |
+
## Usage
|
| 124 |
+
|
| 125 |
+
For usage examples, inference code, and FeatureScript processing pipeline, see the [CADFS GitHub repository](https://github.com/VladPyatov/CADFS).
|
| 126 |
+
|
| 127 |
+
## License
|
| 128 |
+
|
| 129 |
+
This dataset is released under **[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)**.
|
| 130 |
+
It may be used for any purpose, including commercial, with attribution.
|
| 131 |
+
|
| 132 |
+
---
|
| 133 |
+
|
| 134 |
+
## Citation
|
| 135 |
+
|
| 136 |
+
If you use this dataset in your research, please cite:
|
| 137 |
+
|
| 138 |
+
```bibtex
|
| 139 |
+
@inproceedings{pyatov2026cadfs,
|
| 140 |
+
title = {{{CADFS}}: A Big {{CAD}} Program Dataset and Framework for Computer-Aided Design with Large Language Models},
|
| 141 |
+
shorttitle = {{{CADFS}}},
|
| 142 |
+
booktitle = {2026 {{IEEE}}/{{CVF Conference}} on {{Computer Vision}} and {{Pattern Recognition}} ({{CVPR}})},
|
| 143 |
+
author = {Vladislav Pyatov and Gleb Bobrovskikh and Saveliy Galochkin and Nikita Boldyrev and Oleg Voynov and Alexander Filippov and Gonzalo Ferrer and Peter Wonka and Evgeny Burnaev},
|
| 144 |
+
year = 2026,
|
| 145 |
+
month = jun,
|
| 146 |
+
langid = {english}
|
| 147 |
+
}
|
| 148 |
+
```
|