This repository gives the codes for "Fast ground penetrating radar dual-parameter full waveform inversion method accelerated by hybrid compilation of CUDA kernel function and PyTorch". This work has been submitted to Computers and Geosciences.
This study proposes a high-performance dual-parameter full waveform inversion framework (FWI) for ground-penetrating radar (GPR), accelerated through the hybrid compilation of CUDA kernel functions and PyTorch. The method leverages the computational efficiency of GPU programming while preserving the flexibility and usability of Python-based deep learning frameworks. By integrating customized CUDA kernels into PyTorch’s automatic differentiation mechanism, the developed framework enables accurate and efficient inversion of both dielectric permittivity and electrical conductivity.

Cross-hole dual-parameter GPR FWI. (a) True relative permittivity model; (b) initial relative permittivity model; (c) inverted relative permittivity model; (d) true conductivity model; (e) initial conductivity model; (f) inverted conductivity model.
-
CUDA Must Be Installed on the Runtime Device
Ensure that your machine has the NVIDIA CUDA drivers and toolkit properly installed.
You can verify the installation by running:nvcc -V
-
Create or Activate a Conda Environment with CUDA-Enabled PyTorch
Create or activate a Conda virtual environment, and make sure it includes a version of PyTorch with CUDA support.
- You can find suitable CUDA-enabled PyTorch versions at:: https://download.pytorch.org/whl/torch/
- Example: to install PyTorch for CUDA 11.7:
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html
-
Navigate to the FastGPRFWI Project Directory and Compile
Change to the
FastGPRFWI/srcdirectory and compile using the provided Makefile:cd FastGPRFWI/src makeThis will compile the necessary .cu source files into .so shared objects.
-
Run the Test File
example.ipynbOpen and execute the example.ipynb notebook using Jupyter to verify everything is working correctly.
If you find our codes useful, please kindly cite this article.
@article{liu2025fast,
title={Fast ground penetrating radar dual-parameter full waveform inversion method accelerated by hybrid compilation of CUDA kernel function and PyTorch},
author={Liu, Lei and Song, Chao and He, Liangsheng and Wang, Silin and Feng, Xuan and Liu, Cai},
journal={arXiv preprint arXiv:2506.20513},
year={2025} }