All Projects → ChrisWu1997 → DeepCAD

ChrisWu1997 / DeepCAD

Licence: MIT license
code for our ICCV 2021 paper "DeepCAD: A Deep Generative Network for Computer-Aided Design Models"

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to DeepCAD

Top 10 Computer Vision Papers 2020
A list of the top 10 computer vision papers in 2020 with video demos, articles, code and paper reference.
Stars: ✭ 132 (+78.38%)
Mutual labels:  paper, computer-graphics
papers
Summarizing the papers I have read (Japanese)
Stars: ✭ 38 (-48.65%)
Mutual labels:  paper, computer-graphics
snarf
Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.
Stars: ✭ 184 (+148.65%)
Mutual labels:  computer-graphics, iccv2021
PQ-NET
code for our CVPR 2020 paper "PQ-NET: A Generative Part Seq2Seq Network for 3D Shapes"
Stars: ✭ 99 (+33.78%)
Mutual labels:  paper, 3d-shapes
retrieval-fuse
[ICCV21] Code for "RetrievalFuse: Neural 3D Scene Reconstruction with a Database"
Stars: ✭ 69 (-6.76%)
Mutual labels:  iccv2021
visionmagic
Collection of vision & graphics algorithms
Stars: ✭ 39 (-47.3%)
Mutual labels:  computer-graphics
Spatio-Temporal-papers
This project is a collection of recent research in areas such as new infrastructure and urban computing, including white papers, academic papers, AI lab and dataset etc.
Stars: ✭ 180 (+143.24%)
Mutual labels:  paper
SRmeetsPS-CUDA
CUDA implementation of the paper "Depth Super-Resolution Meets Uncalibrated Photometric Stereo"
Stars: ✭ 28 (-62.16%)
Mutual labels:  paper
racket-vulkan
Racket integration with all things Vulkan 💥
Stars: ✭ 40 (-45.95%)
Mutual labels:  computer-graphics
deeplearning-paper-notes
Reading notes on deep learning papers---深度学习论文阅读笔记
Stars: ✭ 36 (-51.35%)
Mutual labels:  paper
NotQuests
Flexible, open & solid paper Quest Plugin [with GUI]
Stars: ✭ 32 (-56.76%)
Mutual labels:  paper
FastAsyncVoxelSniper
Voxel Sniper fork for modern Minecraft versions utilizing the improvements of FastAsyncWorldEdit
Stars: ✭ 38 (-48.65%)
Mutual labels:  paper
SkyWarsReloaded
The most popular Skywars plugin ever built for Spigot and Bukkit!
Stars: ✭ 34 (-54.05%)
Mutual labels:  paper
Paper-Archive
A collection of paper summaries from a wide range of topics related to Machine Learning
Stars: ✭ 26 (-64.86%)
Mutual labels:  paper
-
图形学书单
Stars: ✭ 84 (+13.51%)
Mutual labels:  computer-graphics
lshensemble
LSH index for approximate set containment search
Stars: ✭ 48 (-35.14%)
Mutual labels:  paper
Neural-Architecture-Search
This repo is about NAS
Stars: ✭ 26 (-64.86%)
Mutual labels:  paper
creative-coding-notebooks
🎨 An authorial collection of fundamental recipes on Creative Coding and Recreational Programming.
Stars: ✭ 17 (-77.03%)
Mutual labels:  computer-graphics
Pulp-Fiction-ARKit
An experiment using Volume to reconstruct Pulp Fiction's dance scene in Augmented Reality
Stars: ✭ 46 (-37.84%)
Mutual labels:  computer-graphics
flPapers
Paper collection of federated learning. Conferences and Journals Collection for Federated Learning from 2019 to 2021, Accepted Papers, Hot topics and good research groups. Paper summary
Stars: ✭ 76 (+2.7%)
Mutual labels:  paper

DeepCAD

This repository provides source code for our paper:

DeepCAD: A Deep Generative Network for Computer-Aided Design Models

Rundi Wu, Chang Xiao, Changxi Zheng

ICCV 2021 (camera ready version coming soon)

We also release the Onshape CAD data parsing scripts here: onshape-cad-parser.

Prerequisites

  • Linux
  • NVIDIA GPU + CUDA CuDNN
  • Python 3.7, PyTorch 1.5+

Dependencies

Install python package dependencies through pip:

$ pip install -r requirements.txt

Install pythonocc (OpenCASCADE) by conda:

$ conda install -c conda-forge pythonocc-core=7.5.1

Data

Download data from here (backup) and extract them under data folder.

  • cad_json contains the original json files that we parsed from Onshape and each file describes a CAD construction sequence.
  • cad_vec contains our vectorized representation for CAD sequences, which serves for fast data loading. They can also be obtained using dataset/json2vec.py. TBA.
  • Some evaluation metrics that we use requires ground truth point clouds. Run:
    $ cd dataset
    $ python json2pc.py --only_test

The data we used are parsed from Onshape public documents with links from ABC dataset. We also release our parsing scripts here for anyone who are interested in parsing their own data.

Training

See all hyper-parameters and configurations under config folder. To train the autoencoder:

$ python train.py --exp_name newDeepCAD -g 0

For random generation, further train a latent GAN:

# encode all data to latent space
$ python test.py --exp_name newDeepCAD --mode enc --ckpt 1000 -g 0

# train latent GAN (wgan-gp)
$ python lgan.py --exp_name newDeepCAD --ae_ckpt 1000 -g 0

The trained models and experment logs will be saved in proj_log/newDeepCAD/ by default.

Testing and Evaluation

Autoencoding

After training the autoencoder, run the model to reconstruct all test data:

$ python test.py --exp_name newDeepCAD --mode rec --ckpt 1000 -g 0

The results will be saved inproj_log/newDeepCAD/results/test_1000 by default in the format of h5 (CAD sequence saved in vectorized representation).

To evaluate the results:

$ cd evaluation
# for command accuray and parameter accuracy
$ python evaluate_ae_acc.py --src ../proj_log/newDeepCAD/results/test_1000
# for chamfer distance and invalid ratio
$ python evaluate_ae_cd.py --src ../proj_log/newDeepCAD/results/test_1000 --parallel

Random Generation

After training the latent GAN, run latent GAN and the autoencoder to do random generation:

# run latent GAN to generate fake latent vectors
$ python lgan.py --exp_name newDeepCAD --ae_ckpt 1000 --ckpt 200000 --test --n_samples 9000 -g 0

# run the autoencoder to decode into final CAD sequences
$ python test.py --exp_name newDeepCAD --mode dec --ckpt 1000 --z_path proj_log/newDeepCAD/lgan_1000/results/fake_z_ckpt200000_num9000.h5 -g 0

The results will be saved inproj_log/newDeepCAD/lgan_1000/results by default.

To evaluate the results by COV, MMD and JSD:

$ cd evaluation
$ sh run_eval_gen.sh ../proj_log/newDeepCAD/lgan_1000/results/fake_z_ckpt200000_num9000_dec 1000 0

The script run_eval_gen.sh combines collect_gen_pc.py and evaluate_gen_torch.py. You can also run these two files individually with specified arguments.

Pre-trained models

Download pretrained model from here (backup) and extract it under proj_log. All testing commands shall be able to excecuted directly, by specifying --exp_name=pretrained when needed.

Visualization and Export

We provide scripts to visualize CAD models and export the results to .step files, which can be loaded by almost all modern CAD softwares.

$ cd utils
$ python show.py --src {source folder} # visualize with opencascade
$ python export2step.py --src {source folder} # export to step format

Script to create CAD modeling sequence in Onshape according to generated outputs: TBA.

Acknowledgement

We would like to thank and acknowledge referenced codes from DeepSVG, latent 3d points and PointFlow.

Cite

Please cite our work if you find it useful:

@InProceedings{Wu_2021_ICCV,
    author    = {Wu, Rundi and Xiao, Chang and Zheng, Changxi},
    title     = {DeepCAD: A Deep Generative Network for Computer-Aided Design Models},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2021},
    pages     = {6772-6782}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].