From a443756499bd6370d12a2e3c8155bba36fb2c24b Mon Sep 17 00:00:00 2001 From: mckay Date: Sat, 18 Jan 2025 22:06:24 +0800 Subject: [PATCH] Enhance idea.md with new research points and implementation suggestions; add Dockerfile and .gitignore for pre-processing setup - Expanded the research sections in idea.md to include new innovation points and expected outcomes for noise robustness and feature preservation. - Introduced a Dockerfile for setting up the pre-processing environment with necessary packages. - Added a .gitignore file to exclude training data and raw input directories from version control. - Updated README.md with clearer instructions and code formatting for better usability. --- code/pre_processing/.gitignore | 3 ++ code/pre_processing/Dockerfile | 23 +++++++++++++++ code/pre_processing/README.md | 51 +++++++++++++++++++++++----------- idea.md | 20 +++++++++---- 4 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 code/pre_processing/.gitignore create mode 100644 code/pre_processing/Dockerfile diff --git a/code/pre_processing/.gitignore b/code/pre_processing/.gitignore new file mode 100644 index 0000000..31144fb --- /dev/null +++ b/code/pre_processing/.gitignore @@ -0,0 +1,3 @@ +training_data/ +raw_input/ +Bin/ \ No newline at end of file diff --git a/code/pre_processing/Dockerfile b/code/pre_processing/Dockerfile new file mode 100644 index 0000000..ea6e476 --- /dev/null +++ b/code/pre_processing/Dockerfile @@ -0,0 +1,23 @@ +# 基础版本 +FROM ubuntu:20.04 + +# 基本设置 +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=Asia/Shanghai + +# 安装基础包 +RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + python3 \ + python3-pip \ + libboost-all-dev \ + git \ + vim \ + && rm -rf /var/lib/apt/lists/* + +# 工作目录 +WORKDIR /app + +# 启动终端 +CMD ["/bin/bash"] \ No newline at end of file diff --git a/code/pre_processing/README.md b/code/pre_processing/README.md index 7baa59a..9b01c32 100644 --- a/code/pre_processing/README.md +++ b/code/pre_processing/README.md @@ -10,11 +10,15 @@ Please first download the prepared ABC dataset from [BaiduYun](https://pan.baidu **\[Optional\]** If you want to split the models and generate the correponding *.fea files from the raw ABC dataset, please first put the *.yml and *.obj files in folder _abc_data_ (make sure that file in different formats share the same prefix). Install the PyYAML package via: - $ pip install PyYAML +``` +$ pip install PyYAML +``` and run: - $ python split_and_gen_fea.py +``` +$ python split_and_gen_fea.py +``` You will find the split models and *.fea files in _raw_input_. @@ -22,39 +26,54 @@ You will find the split models and *.fea files in _raw_input_. Please first install the Boost and eigen3 library: - $ sudo apt install libboost-all-dev - $ sudo apt install libeigen3-dev +``` +$ sudo apt install libboost-all-dev +$ sudo apt install libeigen3-dev +``` + Then run: - $ cd PATH_TO_NH-REP/code/pre_processing - $ mkdir build && cd build - $ cmake .. - $ make +``` +$ cd PATH_TO_NH-REP/code/pre_processing +$ mkdir build && cd build +$ cmake .. +$ make +``` You can generate the training data: - $ cd .. - $ python gen_training_data_yaml.py +``` +$ cd .. +$ python gen_training_data_yaml.py +``` The generated training data can be found in _training_data_ folder. If you do not have a yaml file and want to generate sample points from meshes, you can prepare the *.fea file as sharp feature curves of the meshes, then run: - $ python gen_training_data_mesh.py +``` +$ python gen_training_data_mesh.py +``` Please make sure that you set 'in_path' in _gen_training_data_yaml.py_ and _gen_training_data_mesh.py_ as the path containing the *.fea files. - When patch decomposition is conducted (like model 00007974_5), there will be *fixtree.obj and *fixtree.fea in _training_data_, which can be used for generating point samples in later round: - $ python gen_training_data_yaml.py -r +``` +$ python gen_training_data_yaml.py -r +``` + +or -or +``` +$ python gen_training_data_mesh.py -r +``` - $ python gen_training_data_mesh.py -r - You can find the generated training data of the decomposed patch in _training_data_repair_. By default we only decompose one patch and it is enough for most models. But if you find *fixtree.obj and *fixtree.fea in _training_data_repair_, that means that more patches need to decomposed. There are two ways to achieve this. First, you can copy _training_data_repair./*fixtree.obj_ and _training_data_repair./*fixtree.fea_ to _training_data_, and re-run 'python gen_training_data_yaml.py -r', until enough patches are decomposed (i.e. *.conf files can be found in _training_data_repair_). Another way is to decompose all patches at once, to achieve this, simple uncomment the following line in _FeatureSample/helper.cpp_: https://github.com/guohaoxiang/NH-Rep/blob/42ae22bf8fc3f1b4f9f5592443c29aafe86905bd/code/pre_processing/FeatureSample/helper.cpp#L722 After that, rebuild the executable files, and re-run 'python gen_training_data_yaml.py' and 'python gen_training_data_yaml.py -r'. There will be generated training data in _training_data_repair_. + +docker run -it --name brep_processor -v ~/NH-Rep/code/pre_processing:/app brep_pre_processing:v1 + diff --git a/idea.md b/idea.md index dcfc47d..54347c9 100644 --- a/idea.md +++ b/idea.md @@ -3,29 +3,35 @@ ## 1. 数据噪声鲁棒性增强 ### 研究问题 + 现有的方法对数据噪声有一定的鲁棒性,但仍有改进空间。研究如何进一步提高算法对噪声的鲁棒性。 ### 创新点 + - **噪声建模**:引入更复杂的噪声模型(高斯噪声、椒盐噪声等),测试算法在不同噪声条件下的表现 - **对抗训练**:使用对抗生成网络(GAN)或自监督学习方法,增强模型对噪声的鲁棒性 - **正则化技术**:探索新的正则化方法(平滑损失、总变差正则化等),减少噪声对模型的影响 - **多尺度处理**:结合多尺度分析,处理不同层次的几何细节,提高对局部噪声的鲁棒性 ### 预期成果 + 开发一种更鲁棒的隐式转换方法,能够在存在噪声的情况下保持较高的转换质量。 ## 2. 特征保留与细节增强 ### 研究问题 + 虽然现有的方法在保留尖锐特征方面表现出色,但仍然有提升空间。研究如何更好地捕捉和保留B-Rep模型中的细小特征。 ### 创新点 + - **特征检测改进**:引入更先进的特征检测算法(基于深度学习的边缘检测、曲率估计等) - **特征增强损失**:设计专门针对特征保留的损失函数(如特征角度误差FAE的加权版本) - **多分辨率表示**:结合多分辨率表示方法,动态调整特征区域的采样密度 - **后处理优化**:研究等值面提取后的后处理方法,增强特征的清晰度和准确性 ### 预期成果 + 提出一种能够在保持整体几何精度的同时,更好保留尖锐特征和细节的隐式转换方法。 [... 其他部分类似格式 ...] @@ -33,26 +39,30 @@ # 实施建议 1. **选择具体切入点** + - 根据兴趣和资源选择研究重点 - 每个方向都有其独特的挑战和机遇 - 2. **文献综述** + - 进行广泛的文献综述 - 了解当前研究进展和存在的问题 - 找到研究空白点 - 3. **实验设计** + - 设计合理的实验方案 - 选择合适的数据集 - 设定评估指标 - 搭建实验环境 - 4. **代码实现** + - 使用合适的编程工具(Python、PyTorch、TensorFlow等) - 参考开源项目 - 确保代码原创性 - 5. **论文撰写** + - 撰写详细的毕业论文 - 包含完整的研究内容 - - 突出创新点和贡献 \ No newline at end of file + - 突出创新点和贡献 + + +1.15