Maxwell-informed fields
Coordinates, εr, σ, impedance, attenuation, phase, interfaces, pipe geometry, travel time and response priors form one interpretable 26-channel tensor.
PCFlow turns gprMax scene descriptions into GPR B-scans with a 26-channel Maxwell condition encoder and rectified flow in the SDXL-VAE latent space.
The source does not reduce the condition to a text label. It rasterizes material and geometry, derives propagation and response priors, and injects all five physical groups throughout the velocity network.
PCFlow source pipeline: physical scene encoding, latent rectified-flow training and ODE decoding.
Coordinates, εr, σ, impedance, attenuation, phase, interfaces, pipe geometry, travel time and response priors form one interpretable 26-channel tensor.
Geometry, material, reflection, propagation and detail groups modulate residual blocks across a four-level U-Net, with attention at its lower resolutions.
The U-Net learns a latent velocity from noise to data. Euler or Heun integration then transports a random SDXL latent into a synthesized B-scan.
The main preset uses AdamW, automatic mixed precision, gradient clipping and EMA. Conditions are dropped for 10% of samples during training, while deeper latent rows receive greater loss weight.
AdamW1e-48 / 50,0000.100.999Heun · 50 steps# Run inside the executable source directory cd PCFlow # Main preset python train.py # Alternate training preset python train.py \ --model-config configs/model_gpr.yaml \ --train-config configs/train_gpr_dataset_split.yaml
The repository includes 800 scenes across steel, water-filled PVC and air-filled PVC targets. JSONL indexes connect each B-scan to the `.in` file consumed by the loader.
python data/gpr_dataset/build_index.py \ --images_dir path/to/images \ --ins_dir path/to/conditions \ --out_jsonl path/to/train.jsonl
Use Python 3.10 and install the CUDA-enabled PyTorch build suited to your system. The first run downloads the frozen `stabilityai/sdxl-vae` unless a local path is configured.
git clone https://github.com/GeometryFu/PCFlow.git
cd PCFlow
conda create -n pcflow python=3.10 -y
conda activate pcflow
# Install a suitable CUDA-enabled PyTorch build first
pip install -r requirements.txt
python train.py
These figures are versioned with the project. They provide a direct visual companion to the pipeline and fixed-sample monitoring implemented by the training code.
Fixed validation cases make changes across checkpoints directly comparable.
Qualitative examples across the repository's evaluation splits.