CADDreamer is a novel approach for generating high-quality boundary representations (B-rep) of CAD objects from single-view RGB images. Unlike existing 3D generative models that produce dense and unstructured meshes, CADDreamer creates compact, structured, and sharply-edged CAD models that are comparable to those created by human designers.
Our installation process consists of three steps. The first step is to download the pretrained model to the specified ckpts directory.
Here are the links:
- Ckpts directory: save as ckpts directory
- Finetuned Vae directory: save as finetuned_vae_normal directory
- Check the input here: check the input example
- Check the output here: check the output example (segmentation results) Then, modify the corresponding paths in the load_wonder3d_pipeline function.
The main task is to compile and install OpenCascade and FreeCAD's Python bindings. During installation, please pay special attention to the compatibility between different versions of FreeCAD and OpenCascade. On my Ubuntu 22.04 host, I installed OCC version 7.8.1. The FreeCAD version information is as follows:
'0', '22', '0', '38495 (Git)', 'git://github.com/FreeCAD/FreeCAD.git main', '2024/08/19 16:34:53', 'main', '131956e201dc5033de69ed09c28db332feb081c1'
Using incompatible versions may lead to strange, unknown errors.
Create a Python environment using conda and install the corresponding environment using pip.
conda create -n caddreamer python=3.10
conda activate caddreamer
pip install -r requirements.txt
The evaluation consists of two parts: testing on real images and testing on synthetic images.
In the first step, we generate multi-view normal semantic maps from processed normal images and reconstruct 3D meshes using NEUS.
The following command loads all processed normal images from the ./test_real_images folder and selects two images from index 0 to 2 for generation:
python3 test_mvdiffusion_seq.py --config configs/train/testing_4090_stage_1_cad_6views-lvis.yaml --start 0 --end 2 --gpu 0
The successful generation file structure can be found in ./cached_output/cropsize-256-cfg1.0/0_0deepcad.
python3 test_real_image.py --config ./cached_output/cropsize-256-cfg1.0/0_0deepcad --review False
This step will cache segmentation results in the neus/temp_mid_results folder and generate a STEP file. Example STEP files can be found in ./cached_output/cropsize-256-cfg1.0/0_0deepcad.
For convenient parallel processing, our testing is divided into 3 main steps.
In the first step, we generate multi-view normal semantic maps from processed normal images and reconstruct 3D meshes using NEUS.
The following command loads all processed normal images from the ./test_real_images folder and selects two images from index 0 to 2 for generation:
python3 test_mvdiffusion_seq.py --config configs/train/testing_4090_stage_1_cad_6views-lvis.yaml --start 0 --end 2 --gpu 0
In the second step, we perform segmentation based on the reconstructed mesh and multi-view images. The following command executes the second stage segmentation task based on the generated results:
python3 test_syne_images_stage_2_segmentation.py --config_dir ./cached_output/cropsize-256-cfg1.0-syne/0_0deepcad --review True
This task will cache segmentation results in the neus/temp_mid_results folder.
Since primitive stitching is a time-consuming operation, we recommend skipping it if normal fitting can successfully reconstruct the CAD model.
python3 test_syne_images_stage_3_generate_step.py --config_dir ./cached_output/cropsize-256-cfg1.0-syne/0_0deepcad --review True
More generation results can be found in the cover GIF.
I will do my best to open source the code and dataset before the conference. Please stay tuned. If you have any question, please contact me via email: Li.Yuan@utdallas.edu.
- Release
Tools
code, includingpyransac
,neus
, and so on. - Release
Multi-view diffusion
code. - Release
Primitive Stitching
code. - Release
Testing
code. Released the test code in real normal images. - Release
Testing
code. Released the test code in synthetic normal images. - Release
Testing
dataset. Please refer to this link to check the testing cases. - Release
Training
code. - Release
Training Datasets
.
- Wonder3D: Single Image to 3D using Cross-Domain Diffusion
- RANSAC: Efficient RANSAC for Point Cloud Shape Detection
- SyncDreamer: Generating Multiview-consistent Images from a Single-view Image
If you find this work helpful, please cite our paper:
@inproceedings{yuan2025CADDreamer,
author = {Yuan Li and Cheng Lin and Yuan Liu and Xiaoxiao Long and Chenxu Zhang and Ningna Wang and Xin Li and Wenping Wang and Xiaohu Guo},
title = {CADDreamer: CAD Object Generation from Single-view Images},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2025},
publisher = {IEEE},
}