目录

GED-Net

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

Install pointnet2_ops_lib:

https://github.com/erikwijmans/Pointnet2_PyTorch

Data

Our data originates from further processing of the DeepCAD data. Due to the large size of the point cloud data, please download the benchmark dataset from the DeepCAD repository and use the json2pc.py provided there to obtain the corresponding point clouds for the dataset. Please note that you should not use vec2pc.py, as this code appears to have some bugs in point cloud processing.

Place the data folders cad_vec and pc_cad in the data folder under the main directory. Then, you can use the following command to parse the traditional sequences in cad_vec into the grouped sequences described in this paper, saving them in the data/hierarchical_vec folder.

cd utils
python change_hierarchical_dataset.py

We also provide this dataset in Data so that you can use it directly.

Training

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

python main.py --exp_name main

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

Testing and Evaluation

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

cd evaluation
sh test.sh

This command will sequentially execute testing, evaluate instruction reconstruction accuracy, and point cloud reconstruction accuracy, or you can manually execute the commands.

python main.py --exp_name ${cur_exp_name} --test --ckpt ${cur_ckpt}
cd evaluation
python evaluate_ae_acc.py --src ../proj_log/${cur_exp_name}/results/fake_z_ckpt${cur_ckpt}_dec
python evaluate_ae_cd.py --src ../proj_log/${cur_exp_name}/results/fake_z_ckpt${cur_ckpt}_dec --parallel

Visualization

This work provides a script for visualizing sequence data using CATIA software. The script directly visualizes the sequence files on the software platform in an end-to-end manner and supports subsequent editing and modification. Execute the following command to achieve visualization:

cd utils
python visualize_catia.py --src test.h5

This visualization is only applicable to Windows systems and requires the installation of CATIA P3 V5 R21 licensed software.

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

Additionally, this work also provides PythonOCC visualization methods suitable for both Windows and Linux. Execute the following command to run the visualization example:

cd utils
python visualize_pythonocc.py --src test.h5

Acknowledgement

We would like to thank and acknowledge referenced codes from DeepCAD, PointClLIP V2 and PointAttN.

关于
46.6 MB
邀请码