Skip to main content

DeepGPR

DeepGPR provides a wave propagation module for PyTorch, designed for applications such as Ground Penetrating Radar (GPR) imaging and inversion. Its core concepts are derived from Deepwave. You can use it to perform both forward modeling and backpropagation—thereby enabling the simulation of wave propagation to generate synthetic data—as well as for Full Waveform Inversion (FWI). Furthermore, you can integrate this wave propagation functionality into a larger operational pipeline—incorporating various wavelets, loss functions, and other components—to achieve end-to-end forward and reverse propagation, powered by automatic differentiation and our high-performance operators.

Features

Supports 2D and 3D forward modeling of Maxwell's equations—via the Finite-Difference Time-Domain (FDTD) method—for both single and multiple excitation scenarios.

Gradients of the output receiver data can be computed with respect to model parameters (relative permittivity, conductivity), the initial wavefield, and source amplitudes.

Utilizes CPML, allowing the width of the PML layer to be configured independently for each boundary.

All operations are executed on the GPU.

Supports techniques such as checkpointing, DDP, and the utilization of CPU memory to minimize GPU memory consumption, thereby enabling the execution of large-scale models.

Start

Before use, you must ensure that you have an NVIDIA graphics card and have installed a CUDA-enabled version of PyTorch.

DeepGPR can then be installed using

  pip install DeepGPR

A Small Forward Modeling Test

import torch
import DeepGPR
import matplotlib.pyplot as plt

# Set up the parameters and models
device=torch.device("cuda")
dx=0.02
dt=3e-11
nt=2000
er = torch.ones(100, 100,1) * 2  
er[50:,:]=5
se = torch.zeros_like(er)  
er.requires_grad_()
source_location=torch.tensor([[[10,10,0]]],device=device,dtype=torch.int)
receiver_location=torch.tensor([[[10,90,0]]],device=device,dtype=torch.int)
freq=2e8
peak_time = 1 / freq
source_amplitudes = torch.zeros((1,nt,1),device=device)
source_amplitudes[0,:,0]=DeepGPR.ricker(freq, nt, dt, peak_time).to(device)


#forward modeling
r = DeepGPR.compute(
    device=device, dx=dx, dt=dt, 
    source_amplitudes=source_amplitudes,
    source_location=source_location, 
    receiver_location=receiver_location, 
    er=er, se=se
)

(r[-1]**2).sum().backward()

_, ax = plt.subplots(1, 2, figsize=(10, 3))
ax[0].plot(r[-1].detach().flatten().cpu().numpy())
ax[0].set_title("Receiver data")
ax[1].imshow(er.grad.detach())
ax[1].set_title("Gradient")
plt.show()

result

There are more examples in the ./examples.

Metadata

Release files for DeepGPR 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DeepGPR 0.0.5
File Size Uploaded Provenance Actions
deepgpr-0.0.5.tar.gz 344.9 kB Without provenance Details for deepgpr-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for DeepGPR 0.0.5
File Interpreter ABI Platform Actions
deepgpr-0.0.5-py3-none-any.whl Python 3 none any Details for deepgpr-0.0.5-py3-none-any.whl

Total release size: 691.9 kB

Release files / deepgpr-0.0.5.tar.gz

Download URL deepgpr-0.0.5.tar.gz
Size 344.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4bbbda5bb646381401ea9189a6909ec1290b4c798533d849c67efa7c896feb23
BLAKE2b-256 checksum
How to use checksums
5e56038e67e6db78a94b2b256b7bda72fa5279adefd27600e467ebb20508ee87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Release files / deepgpr-0.0.5-py3-none-any.whl

Download URL deepgpr-0.0.5-py3-none-any.whl
Size 347.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd350f2be28294f47c77d15c6a8798b7acaea647976bdf5d6fb96f071394de7c
BLAKE2b-256 checksum
How to use checksums
75f1e80e785cc041dbaa0b591fa5546116d6b603de6ca1df20f39260a80235de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Security for DeepGPR 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page