This repository contains the code used for simulation-assisted ground-penetrating-radar (GPR) void-like defect screening in concrete specimens. The workflow combines gprMax-style synthetic B-scan pre-training, physics-aware GPR channel augmentation, cross-dataset validation, and a probability-level physics-guided residual fusion (PGRF) policy for high-sensitivity screening.
The repository is organized as a paper-code release: scripts are kept runnable, large raw datasets and trained weights are external, and the reported metrics needed for manuscript tables are included under results/metrics/.
scripts/prepare_gprmax_device_aligned_manifest.py: converts the device-aligned gprMax simulation dataset into a manifest.scripts/create_manifest_cls_view.py: converts a manifest into a torchvisionImageFolderclassification view.scripts/create_gpr3_augmented_cls_view.py: builds the raw/background-removed/envelope GPR3 view and physics-like augmentation.scripts/train_sim_pretrain.py: trains the simulation pre-training backbone.scripts/train_torchvision_cls.py: trains real-data classifiers with RGB or GPR3 inputs.scripts/train_dual_gpr_physics_fusion_cls.py: trains the dual RGB/GPR-physics fusion model.scripts/eval_urdd_target_cv_pgrf.py: evaluates the PGRF policy on target-adapted five-fold validation.scripts/eval_specimen_pgrf.py: evaluates the fixed PGRF policy on real specimen scans.results/metrics/: manuscript-level CSV summaries for simulation pre-training, PGRF, and real specimen validation.
Large radargrams, third-party datasets, trained checkpoints, and raw FDTD outputs are not committed. See docs/DATA.md for the expected layout.
PGRF-GPR-void-screening/
configs/
example_paths.yaml
docs/
DATA.md
OPEN_SOURCE_REVIEW.md
REPRODUCIBILITY.md
results/
metrics/
scripts/
CITATION.cff
LICENSE
README.md
requirements.txt
Install dependencies in a Python environment with PyTorch and torchvision:
pip install -r requirements.txtPrepare the gprMax device-aligned simulation manifest:
python scripts/prepare_gprmax_device_aligned_manifest.py \
--root /path/to/GPR_sim_device_aligned \
--out manifests/gprmax_device_aligned_manifest.csv \
--label-mode scenarioConvert the manifest to an ImageFolder view and train the simulation-pretrained backbone:
python scripts/create_manifest_cls_view.py \
--manifest manifests/gprmax_device_aligned_manifest.csv \
--out datasets/GPR_sim_device_aligned_scenario_view \
--image-col image \
--label-col scenario \
--split-col split \
--domain gprmax_device_aligned
python scripts/create_gpr3_augmented_cls_view.py \
--data datasets/GPR_sim_device_aligned_scenario_view \
--out datasets/GPR_sim_device_aligned_scenario_view_gpr3 \
--positive-class void \
--positive-augmentations 0 \
--negative-augmentations 0
python scripts/train_sim_pretrain.py \
--data datasets/GPR_sim_device_aligned_scenario_view_gpr3 \
--model efficientnet_b0 \
--out runs/sim_gpr3_effb0_pretrain \
--epochs 30 \
--input-mode gpr3 \
--pretrainedFine-tune on real GPR views using the simulation backbone:
python scripts/train_torchvision_cls.py \
--data datasets/GPR_void_like_binary_views_kfold_buffered/tigpr_binary_void_block5fold_buffer1_fold0 \
--model efficientnet_b0 \
--out runs/effb0_simpre_gpr3_fold0 \
--epochs 35 \
--input-mode gpr3 \
--init-weights runs/sim_gpr3_effb0_pretrain/sim_pretrained_backbone.pth \
--loss cost_sensitive_ce \
--training-fn-cost 10 \
--selection-metric val_min_expected_cost \
--selection-fn-cost 10Run the target-adapted PGRF evaluation after the RGB and GPR3 folds are trained:
PGRF_PROJECT_ROOT=$(pwd) \
PGRF_RUN_ROOT=runs/urdd_target_adapted_5fold_pgrf \
python scripts/eval_urdd_target_cv_pgrf.pyThe key manuscript conclusions can be reproduced from results/metrics/:
| Setting | Pooled recall | FN | FN10 cost | Comment |
|---|---|---|---|---|
| Dual CostCE, no augmentation | 0.667 | 99 | 0.191 | Real-data baseline |
| Dual CostCE + physics augmentation | 0.734 | 79 | 0.164 | Augmentation only |
| Dual CostCE + simulation pre-training + physics augmentation | 0.869 | 39 | 0.144 | Simulation pre-training reduces false negatives |
| Target-adapted PGRF selected policy | 0.953 | 4 | 0.414 | High-sensitivity target screening |
| Real specimen, contrast-normalized PGRF | 0.875 accuracy | 1 | - | Specificity is 1.000 on the plain concrete scans |
Simulation pre-training reduced pooled false negatives by 60 compared with the no-augmentation dual baseline, and by 40 compared with physics augmentation without simulation pre-training. This supports the manuscript claim that simulation pre-training helps alleviate real GPR data scarcity while preserving defect morphology under complex backgrounds.
If you use this code, please cite the associated manuscript once it is available. The provisional citation metadata is provided in CITATION.cff.
The simulation workflow is designed for gprMax-style FDTD data. If gprMax-generated data are used, please cite gprMax according to its official instructions.