CAD-GPT: Synthesising CAD Construction Sequence with Spatial Reasoning-Enhanced Multimodal LLMs

1Shanghai Jiao Tong University, 2Center of Intelligent Wireless Networks and Cooperative Control, 3University of Minnesota
*Corresponding Author


Leveraging a 3D modeling spatial localization mechanism, CAD-GPT outputs 3D parameters in a one-dimensional linguistic form, enabling robust spatial reasoning capabilities. Building on this foundation, CAD-GPT can precisely synthesize CAD modeling sequences from either a single image or a textual description.

CAD-GPT is the pioneering multimodal large language model designed to process a single image or textual description as input, specifically for the precise synthesis of CAD modeling sequences

Abstract

Computer-aided design (CAD) significantly enhances the efficiency, accuracy, and innovation of design processes by enabling precise 2D and 3D modeling, extensive analysis, and optimization. Existing methods for creating CAD models rely on latent vectors or point clouds, which are difficult to obtain and storage costs are substantial. Recent advances in Multi-modal Large Language Models (MLLMs) have inspired researchers to use natural language instructions and images for CAD model construction. However, these models still struggle with inferring accurate 3D spatial location and orientation, leading to inaccuracies in determining the spatial 3D starting points and extrusion directions for constructing geometries. This work introduces CAD-GPT, a CAD synthesis method with spatial reasoning-enhanced MLLM. Our method propose a 3D Modeling Spatial Mechanism for accurately inferring spatial information. This method maps 3D spatial positions and 3D sketch plane rotation angles into a 1D linguistic feature space using a specialized spatial unfolding mechanism while discretizing 2D sketch coordinates into an appropriate planar space, enabling precise determination of spatial position, sketch orientation, and translation. Extensive experiments demonstrate that CAD-GPT consistently outperforms existing state-of-the-art methods in CAD model synthesis, both quantitatively and qualitatively.


Overview of our CAD-GPT framework. On the left side, a dashed box contains the overall algorithm framework. The right side provides a detailed view of our 3D Modeling Spatial Localization Mechanism.

Model Training and Dataset Construction of CAD-GPT

Dataset Construction: Utilizing the DeepCAD dataset, we generated 160k fixed-viewpoint CAD model images and 18k corresponding natural language captions. Enhancing Spatial Reasoning Capability: We designed a novel localization mechanism tailored for the 3D modeling process, enhancing the spatial reasoning capabilities of large language models by mapping 3D space into 1D through a tokenization method. Training strategy: The training was conducted in two phases: first, we fine-tuned on the image-CAD data, and then on the text-CAD data with a lower learning rate.

The CAD Models generated by CAD-GPT

The models in the image demonstrate semantic sketch generation capabilities (e.g., a heart shape and the letter "E"), category-based CAD generation capabilities (e.g., a table, a chair, and a key), spatial reasoning abilities (e.g., a table and mutually perpendicular cylinders), and the capability to generate identical models with varying dimensions (e.g., three connectors with two circular holes of differing sizes).

objaverse

Comparison of Different Methods for Image Input Scenarios

Given a single image, CAD-GPT leverages its advanced spatial reasoning capabilities to accurately generate the modeling sequence of the CAD model depicted in the image.

img2CAD

Comparison of Different Methods for Text Input Scenarios

Given a textual description, CAD-GPT can generate a CAD model that precisely aligns with the semantics of the description.

text2CAD

Comparison of Generation Results with and without the 3D Modeling Spatial Mechanism

It is evident that with the addition of the 3D Modeling Spatial Mechanism, the model can accurately infer key parameters such as the 3D angles, 3D starting positions, and 2D sketch shapes during the modeling process, enabling precise model generation.

withorwithout3d

More Complex CAD Models Generated by CAD-GPT

Based on the displayed models, we can observe CAD-GPT's advanced spatial reasoning capabilities and its ability to generate complex sketches.

withorwithout3d

BibTeX

If you find our project helpful, please kindly consider citing our paper.