Yingtong Hu 04e391ee4d | 1 year ago | |
---|---|---|
.. | ||
src | 2 years ago | |
README.md | 3 months ago | |
README_CN.md | 3 months ago | |
eval.py | 2 years ago | |
train.py | 2 years ago |
The classic electromagnetic simulation method is based on finite element method or finite difference method, which requires a lot of iterative calculation, leads to a long time of calculation and cannot meet the requirements of modern product design for simulation efficiency. The AI method directly obtains scattering parameters through end-to-end simulation calculation, skipping iterative calculation, greatly improving the simulation speed and shortening the product R&D period.
In certain product design scenarios, the target structure cannot be described by a fixed set of parameters. For these scenarios, we propose a AI calculation method based on point cloud data for , which can predict the scattering parameters of any complex structure (mobile phone, PCB board, etc.).
Generate scatter parameters prediction input data based on Point Cloud Data Generation and Point Cloud Data Compression. The label needs to be generated by using commercial simulation software or a finite difference time domain algorithm.
The generated dataset need to be normalized and smoothed using the generate_data
function in src/data_preprocessing.py
, tutorial can be found in script description/data preprocessing
.
The model training data in this example involves commercial secrets and the download address cannot be provided. The developer can use src/sampling.py
to generate pseudo data for functional verification.
.
└─S_parameter
├─README.md
├─src
├─config.py ## Parameter configuration
├─dataset.py ## dataset loader
├─data_preprocessing.py ## data preprocessing
├─metric.py ## Evaluation script
├─model.py ## Scatter parameters prediction model of point cloud
├─lr_generator.py ## learning rate generate
├─sampling.py ## pseudo data generation
├──train.py ## Training network
├──eval.py ## Evaluation network
You can configure training parameters in the src/config.py
file.
'input_channels': 4, ## Channel of input tensor
'epochs': 4000, ## Training epoch numbers
'batch_size': 8, ## Batch size of input tensor
'lr': 0.0001, ## Init value of learning rate
'lr_decay_milestones': 5, ## Decay epochs of learning rate
Before training or evaluation, you need to call src/data_preprocessing.py
to normalize and smoothing the data.
cd src
python data_preprocessing.py --input_path INPUT_PATH
--label_path LABEL_PATH
You can train the data compression model through the train.py
, and the model parameters will be automatically saved after the training.
python train.py --train_input_path TRAIN_INPUT_PATH
--train_label_path TRAIN_LABEL_PATH
--device_num 0
--checkpoint_dir CKPT_PATH
After the model training process, you can start the evaluation process through eval.py
.
python eval.py --input_path TEST_INPUT_PATH
--label_path TEST_LABEL_PATH
--data_config_path DATA_CONFIG_PATH
--device_num 0
--model_path CKPT_PATH
--output_path OUTPUT_PATH
During the evaluation process, a real-time comparison chart of the predict value and the ture value will be drawn and saved in the output directory.
The seed of the "create_dataset" function is set in train.py
.
Visit the official website home page.
MindScience is scientific computing kits for various industries based on the converged MindSpore framework.
Jupyter Notebook Python Unity3D Asset Pickle nesC other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》