目录

NamingCAD

Prerequisites

  • Windows or Linux
  • NVIDIA GPU 4090 × 2 + CUDA CuDNN
  • Python 3.8, PyTorch 1.13.0+, torch-scatter-2.1.1+

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

Our data is based on the DeepCAD data. Please download the benchmark dataset from the DeepCAD repository .

Place the data folders cad_vec in the data folder under the main directory.

Meanwhile, unzip the New_Naming_dataset.zip file located in the data folder, which is the naming information dataset created in this paper. This experiment requires using both datasets simultaneously.

Training

After preparing the dataset, simply enter the following command to start training.

python train.py --exp_name newDeepCAD

The trained models will be saved in proj_log/newDeepCAD/.

Testing and Evaluation

You can directly use the batch processing script we provide for testing by executing the following command.

python test.py --mode rec
python evaluate_ae_name_new.py --src ../proj_log/newDeepCAD/results/test_latest

This command will sequentially execute testing, evaluate naming accuracy.

Extended Generation Experiment: Testing

We also provide an extended generation experiment for reference only. Please copy the pc2cad folder from the l-gan experiment results generated by DeepCAD to proj_log/newDeepCAD/gen_results_before_feat, and run test_for_gen_results.py to predict naming information, which will be stored in the proj_log/newDeepCAD/name_for_gen_results folder.

Next, run create_model_with_naming_for_gan.py to generate models with high-level features. Their point clouds, STP files, and sequence files will be stored in proj_log/newDeepCAD/NamingRecon_pc, proj_log/newDeepCAD/NamingRecon_stp, and proj_log/newDeepCAD/NamingRecon_dataset, respectively.

Extended Generation Experiment: Evaluation

Please execute the following command to perform the evaluation.

cd evaluation
python convert_train_str.py
python convert_gen_str.py
python evaluate_novelty.py
python evaluate_unique_novelty.py
python evaluate_gen_torch.py --src ../proj_log/newDeepCAD/gen_results_before_feat_pc --n_test 1000 -g 0

Notice: This experiment is only applicable to Windows systems and requires the installation of CATIA P3 V5 R21 licensed software. Furthermore, this experiment is exploratory in nature. Its purpose is not to compare with other methods, but solely to demonstrate that this naming approach can be applied to other domains beyond deep learning prediction. The quality of the results is not the primary value.

Disclaimer: This work is for academic research purposes only and is not intended for any commercial or profit-making activities.

Unfortunately, due to an unexpected loss of code for this experiment, we have done our best to restore it. However, the code for converting naming lists and adjacency matrices into actual unstructured naming in the extended experiments, as well as the generation code for applying naming selection and high-level features, was too complex. Our carefully restored code (which corrected some bugs that may have existed originally) has resulted in some changes in the generation metrics. The restored data are as follows:

Method COV (%) MMD JSD Unique (%) Novel (%)
DeepCAD 79.2 1.29 3.47 84.9 94.5
SkexGen 83.5 1.22 1.71 99.9 99.1
HNC-Net 85.0 1.28 1.50 99.9 92.4
Ours 79.9 1.37 3.64 99.6 99.5

However, as described in the paper, the purpose of this experiment is to demonstrate that the naming mechanism can be subsequently used for other tasks such as generation, and it is a discussion-oriented extended experiment. Therefore, it does not affect the paper content framework and core conclusions of the main experiments (naming learning and prediction). And it still retains the ability to be applied to downstream generation tasks as well as other tasks. We sincerely apologize for this issue.

Acknowledgement

We would like to thank and acknowledge referenced codes from DeepCAD.

关于
38.5 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号