9.4 KiB
🔍 Source-Independent Full Waveform Inversion for GPR using Deep Learning
A PyTorch-based implementation of a source-independent full waveform inversion (FWI) framework tailored for ground-penetrating radar (GPR) data, leveraging deep learning techniques to reconstruct subsurface permittivity models. This method is suitable for GPR investigation in permafrost environments or undulating strata.
Program name: GPR-SIDL-inv
Program size: 98.6 Mb.
Program language: Python 3.10.4
📌 Features:
🚀 Source-independent inversion: The model learns to invert waveforms even with varying GPR sources.
🧠 Noise simulation: The dataset can simulate real noisy environments.
🌍 Using gprMax to establish reliable datasets in three-dimensional simulation scenarios
📉 Support initial model or none, time-depth conversion, depth-time conversion, GSSI data conversion and other functions...
📂 Project Structure
GPR-SIDL-inv/
├── dataset/ # Training/testing data and synthetic datasets
├── data.csv # Already generated dataset (70MHz Ricker wavelet)
├── label.csv # Already generated dataset (70MHz Ricker wavelet)
(Note: The pre generated data.csv and label.csv datasets have been compressed into the dataset.rar file package)
├── field_data/ # Used to store field data for inversion
├── IMG/ # Used for storing data processing and inversion result graphs
├── impulse/ # Used to store simulated and measured source wavelet files
├── Log/ # operation log
├── Network/ # Used for storing network models and data loading programs
├── Model.py/ # Network Model Based on Transformer and U-shaped Network Structure
├── Mydataset.py/ # Data loading and preprocessing
├── readgssi/ # Software package for reading and converting raw data
├── SAVE/ # Save the trained model
├── time_result_csv/ # Inverse results in the time domain
├── utils/ # tool kit
├── layers_generator.py/ # Generate random layers and assign attribute programs
├── train_val_lr.py/ # Network Training and Validation Management
├── plot.py/ # the tool kit for plotting the 2D image
├── 1_model_generator.py # Randomly generate in files as needed to support forward modeling of gprMax in 3D media.
├── 2_forward_simulation.py # Run the forward modeling program to generate A-scan results
├── 3_combine_dataset.py # Filter all A-scan data and generate a dataset
├── 4_gssi_data_convert.py # Convert the dzt file of the measured GSSI GPR to CSV format
├── 5_data_preprocess.py # Preprocess the measured raw data (dewow, direct wave removal, static correction, etc.)
├── 6_extract_impulse.py # Extract the true source wavelet from the processed data
├── 7_network_train.py # Training a deep learning network for inversion
├── 8_prediction.py # Predicting real measured data
├── 9_time_depth_convert.py # Convert the predicted results into the deep domain through integration
├── config.py # Configuration file, used to define all paths, variables, and parameters
├── requirements.txt # Python dependencies
└── README.md # This file
💡 Hardware requirements:
Please select the appropriate device according to your requirements. We conducted tests on a Dell laptop with an Intel(R) Core (TM) i7-12700H CPU (maximum physical memory of 15.7 GiB.) and an NVIDIA RTX 3070 Ti Laptop GPU (maximum physical memory of 7.8 GiB).
📚 Software requirements
No external software. Python dependencies are listed in the requirements.txt.
🛠️ Installation
1. Clone the repository
git clone https://gitee.com/sduem/gpr-sidl-inv
cd GPR-FWI-DeepLearning
2. Install gprMax (optional but recommended).
link: https://www.gprmax.com/
3. Install dependencies
pip install -r requirements.txt
📊 Usage
We provide an interface program for calling gprMax to generate custom datasets. If you need to generate a dataset, you can start running it from the first step. If you already have a simulated dataset, you can skip the first three steps. Steps four to six are used for personalized processing of our measured data, and we provide a frozen soil area measured data for testing. If you need to test new field data, please make targeted modifications. We provide a well generated 70MHz Rayleigh wavelet forward modeling dataset to support users in using it directly without having to train the dataset themselves. We also provide on-site collection of permafrost ground penetrating radar data on the Qinghai Tibet Plateau, as well as corresponding trained network models, for users to test our program. Users can directly run the inversion program for testing.
1. Dataset generation
Step1: Run program 1_model_generator.py Generate the "in" files for simulation. Set the dataset model parameters, including model num, wavelet, size, permittivity range, etc. Please refer to the corresponding documents for specific requirements and details.
Step2: Run program 2_forward_simulation.py Generate the results of formward simulation. Set the parameters for removing direct wave, including the static time, direct wave time, etc. Please refer to the corresponding documents for specific requirements and details. The forward modeling process takes a long time, so we suggest running this program in parallel on multiple lines on the server.
Step3: Run program 3_combine_dataset.py Filter, sort, normalize, and integrate the forward modeling data into a dataset. Please refer to the corresponding documents for specific requirements and details.
2. Field data convertion and prepocessing
Step4: Run 4_gssi_data_convert.py Convert the raw data collected by GSSI ground penetrating radar into CSV file format. If the user is using a different model of ground penetrating radar, please convert the raw data accordingly. Please refer to the corresponding documents for specific requirements and details.
Step5: Run 5_data_preprocess.py Preprocess the measured raw data (dewow, direct wave removal, static correction, etc.) Please refer to the corresponding documents for specific requirements and details. The forward modeling process takes a long time, so we suggest running this program in parallel on multiple lines on the server.
3. Source wavelet select and network training
Step6: Run 6_extract_impulse.py Extract the true source wavelet from the processed data. Please refer to the corresponding documents for specific requirements and details.
Step7: Run 7_network_train.py Training a deep learning network for inversion. Set the parameters for learning rate, batch_size, etc. Please refer to the corresponding documents for specific requirements and details.
4. Prediction and time-depth convertion
Step8: Run 8_prediction.py Predicting real measured data. Please refer to the corresponding documents for specific requirements and details.
Step9: Run 9_time_depth_convert.py Convert the predicted results into the deep domain through integration. Please refer to the corresponding documents for specific requirements and details.
🙏 Acknowledgements
We sincerely thank the developers of the following open-source tools used in this project:
- gprMax: An open-source electromagnetic wave simulation software widely used for Ground Penetrating Radar (GPR) modeling and research.
- readgssi: An open-source Python tool designed to read and process GPR data collected by GSSI equipment.
Both gprMax and readgssi are licensed under the GNU General Public License v3 (GPL-3.0), a strong copyleft license approved by the Open Source Initiative (OSI), and widely used in global and Chinese open-source communities.
We are grateful for their contributions to the scientific and open-source ecosystem.
📝 Citation
If you use this code in your research, please cite:
@article{your2025sourceindependent, title={Source-independent Full Waveform Inversion for GPR Using Deep Learning}, author={Junkai Ge, Rui Liu, Shirong Zhang, Xiaodong Li, Huaifeng Sun, Bo Tian, Ziqiang Zheng}, journal={Computers & Geosciences}, year={2025}, doi={under review} }
🧾 License
This project is licensed under the GNU General Public License v3 for open-source academic use.
If you wish to use this software for commercial purposes and cannot comply with the GPL v3, a separate Commercial License is available.
Please contact us at [sunhuaifeng@email.sdu.edu.cn] for further details.
📫 Contact
If you have questions, reach out to:
Huaifeng Sun Email: sunhuaifeng@email.sdu.edu.cn State Key Laboratory for Tunnel Engineering, Institute of Geotechnical and Underground Engineering, Department of Engineering Software, Shandong University, 17923, Jingshi Road, Jinan, Shandong, China, 250061.