Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CAD-MLLM: Unifying Multimodality-Conditioned CAD Generation With MLLM

CAD-MLLM/CAD-MLLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAD-MLLM: Unifying Multimodality-Conditioned CAD Generation With MLLM

Jingwei Xu1* · Chenyu Wang2* · Zibo Zhao1 · Wen Liu3 · Yi Ma4 · Shenghua Gao4†

Paper PDF Project Page Data Set
ShanghaiTech University | Transcengram | DeepSeek AI | University of Hong Kong
(* denotes equal contribution, † denotes the corresponding author)

🎉 News

  • [2025.05] 🔥🔥🔥 Release the Evaluation Code on the proposed new metrics
  • [2025.05] 🔥🔥🔥 Release the Omni-CAD dataset
  • [2024.11] 📢📢📢 Release arXiv paper and init project

To Do List

  • Release the Inference Code
  • Release the Training Code
  • Release the Evaluation Code on the proposed new metrics
  • Release the Omni-CAD dataset
  • Release Project Page & Technical Report

Example of Command Sequence Construction

Simple Demonstration

Please view our project page for more information.

test_output.mp4

Data

Our preprocessing code is built upon DeepCAD.

Step 0: Environment setup

git submodule update --init --recursive
conda create -n DeepCAD python=3.8
cd ./3rd_party/DeepCAD
pip install -r requirements.txt
conda install -c conda-forge pythonocc-core=7.8.1

Step 1: Download the dataset

(model json description and the text caption)

mkdir data
cd ./data
wget https://huggingface.co/datasets/jingwei-xu-00/Omni-CAD/resolve/main/Omni-CAD.zip
unzip Omni-CAD.zip
cd ..

The directory structure should look like this:

└── data
    └── Omni-CAD
        └── json
            ├── 0000
            ├── 0001
            └── ...
        └── txt
            ├── 0000.json
            ├── 0001.json
            └── ...

Step 2: Export the mesh

cd ./3rd_party/DeepCAD/utils 
python3 ./export2step.py --src ../../../data/Omni-CAD/json --form json --num -1 [--output_form ply]
cd ../../..

After the .step file export is complete, run:

cd ./data/Omni-CAD
mv json_step step
# [mv json_ply ply]
cd ../..

The directory should look like:

└── data
    └── Omni-CAD
        └── json
            ├── 0000
            ├── 0001
            └── ...
        └── step
            ├── 0000
            ├── 0001
            └── ...
        └── txt
            ├── 0000.json
            ├── 0001.json
            └── ...

Step 3: Point cloud sampling

cd ./3rd_party/DeepCAD/utils
python3 export2pc.py --data_root ../../../data/Omni-CAD --normalize --output_format npy 
cd ../../..

The directory structure should look like this:

└── data
    └── Omni-CAD
        ├── json
        ├── step / (ply)
        ├── txt
        └── pcd

Step 4: Image rendering

There are multiple options for the image rendering with the models.

  1. Blender
  2. Mitsuba3
  3. Open3D
  4. PythonOCC
  5. ...

Here we provide a script to utilize the PythonOCC to render the .step file.

cd ./scripts
python3 occ_render.py --src ../data/Omni-CAD/step --num -1
cd ..

You may use .ply file format to render the image with other renderers for simplicity.

cd ./data/Omni-CAD
mv step_img img
cd ../..

Finally, the directory structure should look like this:

└── data
    └── Omni-CAD
        ├── json
        ├── step / (ply)
        ├── txt
        ├── pcd
        └── img

Model code

We state our plan at #1.

Metrics computation code

In this paper, we proposed new metrics Segment Error (SegE), Dangling Edge Length (DangEL), Self Intersection Ratio (SIR), and Flux Enclosure Error (FluxEE).

deepcad_recon_mesh
Example: blue lines denote dangling edges bounded by only one face. Our metric DangEL counts the sum of their lengths.

If you want to evaluate them in your own project, please visit CAD-MLLM-metrics for the code and guidance.

Acknowledgements

We acknowledge the support of the following projects to our data preprocessing: DeepCAD.

Bibtex

@misc{xu2024CADMLLM,
      title={CAD-MLLM: Unifying Multimodality-Conditioned CAD Generation With MLLM}, 
      author={Jingwei Xu and Chenyu Wang and Zibo Zhao and Wen Liu and Yi Ma and Shenghua Gao},
      year={2024},
      eprint={2411.04954},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

About

CAD-MLLM: Unifying Multimodality-Conditioned CAD Generation With MLLM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages