FlexCAD: Unified and Versatile Controllable CAD Generation with Fine-tuned Large Language Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhang, Zhanwei, Sun, Shizhao, Wang, Wenxiao, Cai, Deng, Bian, Jiang
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910829825228800
author Zhang, Zhanwei
Sun, Shizhao
Wang, Wenxiao
Cai, Deng
Bian, Jiang
author_facet Zhang, Zhanwei
Sun, Shizhao
Wang, Wenxiao
Cai, Deng
Bian, Jiang
contents Recently, there is a growing interest in creating computer-aided design (CAD) models based on user intent, known as controllable CAD generation. Existing work offers limited controllability and needs separate models for different types of control, reducing efficiency and practicality. To achieve controllable generation across all CAD construction hierarchies, such as sketch-extrusion, extrusion, sketch, face, loop and curve, we propose FlexCAD, a unified model by fine-tuning large language models (LLMs). First, to enhance comprehension by LLMs, we represent a CAD model as a structured text by abstracting each hierarchy as a sequence of text tokens. Second, to address various controllable generation tasks in a unified model, we introduce a hierarchy-aware masking strategy. Specifically, during training, we mask a hierarchy-aware field in the CAD text with a mask token. This field, composed of a sequence of tokens, can be set flexibly to represent various hierarchies. Subsequently, we ask LLMs to predict this masked field. During inference, the user intent is converted into a CAD text with a mask token replacing the part the user wants to modify, which is then fed into FlexCAD to generate new CAD models. Comprehensive experiments on public dataset demonstrate the effectiveness of FlexCAD in both generation quality and controllability. Code will be available at https://github.com/microsoft/FlexCAD.
format Preprint
id arxiv_https___arxiv_org_abs_2411_05823
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle FlexCAD: Unified and Versatile Controllable CAD Generation with Fine-tuned Large Language Models
Zhang, Zhanwei
Sun, Shizhao
Wang, Wenxiao
Cai, Deng
Bian, Jiang
Computer Vision and Pattern Recognition
Artificial Intelligence
Graphics
Recently, there is a growing interest in creating computer-aided design (CAD) models based on user intent, known as controllable CAD generation. Existing work offers limited controllability and needs separate models for different types of control, reducing efficiency and practicality. To achieve controllable generation across all CAD construction hierarchies, such as sketch-extrusion, extrusion, sketch, face, loop and curve, we propose FlexCAD, a unified model by fine-tuning large language models (LLMs). First, to enhance comprehension by LLMs, we represent a CAD model as a structured text by abstracting each hierarchy as a sequence of text tokens. Second, to address various controllable generation tasks in a unified model, we introduce a hierarchy-aware masking strategy. Specifically, during training, we mask a hierarchy-aware field in the CAD text with a mask token. This field, composed of a sequence of tokens, can be set flexibly to represent various hierarchies. Subsequently, we ask LLMs to predict this masked field. During inference, the user intent is converted into a CAD text with a mask token replacing the part the user wants to modify, which is then fed into FlexCAD to generate new CAD models. Comprehensive experiments on public dataset demonstrate the effectiveness of FlexCAD in both generation quality and controllability. Code will be available at https://github.com/microsoft/FlexCAD.
title FlexCAD: Unified and Versatile Controllable CAD Generation with Fine-tuned Large Language Models
topic Computer Vision and Pattern Recognition
Artificial Intelligence
Graphics
url https://arxiv.org/abs/2411.05823