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.
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.
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.
NamingCAD
Prerequisites
Dependencies
Install python package dependencies through pip:
Install pythonocc (OpenCASCADE) by conda:
Data
Our data is based on the DeepCAD data. Please download the benchmark dataset from the DeepCAD repository .
Place the data folders
cad_vecin thedatafolder 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.
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.
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.pyto 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.
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:
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.