File size: 5,946 Bytes
619b1f4
 
e16c78c
 
 
 
 
 
 
 
619b1f4
e16c78c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7013f1
e16c78c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
---
license: cc-by-4.0
task_categories:
- text-to-3d
- image-to-3d
language:
- en
tags:
- CAD
- code-generation
---
# CADFS Dataset

<div align="center">

<p style="font-size:36px;">CADFS: A Big CAD Program Dataset and Framework for Computer-Aided Design with Large Language Models</p>
<div style="display: flex; justify-content: center; gap: 10px;">
  <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>
  <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>
  <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>
</div>

</div>

<br>

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.

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.

---

## Data Description

### `dataset/` β€” Processed Data

| File | Description |
|------|-------------|
| `featurescript_fp.zip` | Full-precision processed FeatureScript programs. |
| `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. |
| `text_annotations.zip` | Natural language annotations describing the geometry, topology, and design intent of each model, obtained with GPT-OSS-120b. |
| `step.zip` | STEP files with B-rep geometry. Rendered from `featurescript_fp.zip` where possible, or `featurescript_rp.zip` otherwise. |

### `raw/` β€” Raw Source Data

Source data used to create the processed FeatureScript representation.

| File | Description |
|------|-------------|
| `featurescript_raw.zip` | Unprocessed FeatureScript programs. |
| `sketch_raw.zip` | Sketch metadata extracted from FeatureScript feature trees. |
| `step_abc.zip` | STEP files extracted from the ABC dataset, used in both training and evaluation. |
| `multiview_images_abc.zip` | Multi-view images rendered from `step_abc.zip`, used in both training and evaluation. |

### `test_data/` β€” Evaluation Benchmarks

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:

| Benchmark | Contents |
|-----------|----------|
| **CADFS** | jsonl, fs, annotations, images, step |
| **DeepCAD** | jsonl, fs, annotations, images, step |
| **CADParser** | jsonl, images, step |

### `train_data/` β€” Training Splits

Training data is split into two stages following the CADFS two-stage fine-tuning strategy, and two input modalities each. We filtered out duplicates and kept only samples whose input and output fit within a context size of 8192 tokens.

| File | Stage | Modality | Description |
|------|-------|----------|-------------|
| `stage1_txt_train.jsonl` | Stage 1 | Text | Pre-training on text-to-FeatureScript generation |
| `stage1_img_train.jsonl` | Stage 1 | Image | Pre-training on image-to-FeatureScript generation |
| `stage2_txt_train.jsonl` | Stage 2 | Text | Fine-tuning with high-quality curated text pairs |
| `stage2_img_train.jsonl` | Stage 2 | Image | Fine-tuning with high-quality curated image-program pairs |

For training and evaluation we use `.jsonl` data format. Each `.jsonl` line follows the format:

**Image input:**
```json
{
  "messages": [
    {
      "role": "system",
      "content": "You are CAD code generation model."
    },
    {
      "role": "user",
      "content": "<image>Generate a CAD model using FeatureScript framework..."
    },
    {
      "role": "assistant",
      "content": "FeatureScript 1511;\n..."
    }
  ],
  "images": ["path/to/0085/00858269.png"],
  "cad_file_id": "00858269"
}
```

**Text input:**
```json
{
  "messages": [
    {
      "role": "system",
      "content": "You are CAD code generation model."
    },
    {
      "role": "user",
      "content": "Step 1 - Sketch\nCreate a new sketch on the default top plane..."
    },
    {
      "role": "assistant",
      "content": "FeatureScript 1511;\n..."
    }
  ],
  "cad_file_id": "00858269"
}
```

---

## Usage

For usage examples, inference code, and FeatureScript processing pipeline, see the [CADFS GitHub repository](https://github.com/VladPyatov/CADFS).

## License

This dataset is released under **[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)**.  
It may be used for any purpose, including commercial, with attribution.

---

## Citation

If you use this dataset in your research, please cite:

```bibtex
@inproceedings{pyatov2026cadfs,
    title      = {{{CADFS}}: A Big {{CAD}} Program Dataset and Framework for Computer-Aided Design with Large Language Models},
    shorttitle = {{{CADFS}}},
    booktitle  = {2026 {{IEEE}}/{{CVF Conference}} on {{Computer Vision}} and {{Pattern Recognition}} ({{CVPR}})},
    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},
    year       = 2026,
    month      = jun,
    langid     = {english}
}
```