Papers
Topics
Authors
Recent
2000 character limit reached

SynthPix: Accelerated Synthetic PIV Imaging

Updated 17 December 2025
  • SynthPix is an ultra-high-throughput synthetic image generation framework for PIV, achieving rates up to 22,538 image pairs/sec on GPUs using JAX.
  • It leverages vectorized particle seeding, flow propagation, and parallelism to overcome legacy CPU limitations and enable real-time dataset production.
  • The framework offers YAML/JSON-driven configuration and a Python API for seamless integration into machine learning and control systems.

SynthPix is an ultra-high-throughput synthetic image generation framework for Particle Image Velocimetry (PIV), engineered for accelerators using JAX. Its primary objective is to address the need for large-scale, rapid generation of PIV image pairs in contemporary data-driven fluid dynamics, where deep learning, reinforcement learning, and real-time feedback control methodologies demand millions of images per experiment. SynthPix is designed to standardize and accelerate synthetic PIV image dataset creation, overcoming the performance, flexibility, and parallelism limitations observed in prior tools (Terpin et al., 10 Dec 2025).

1. Motivation and Context

Modern PIV applications—particularly those deploying machine learning for flow estimation or real-time control—are bottlenecked by legacy synthetic image generation tools, which are typically CPU-based, sequential, or lack batch-awareness. Tools like EUROPIV-SIG, SynPIVimage, PIVlab, and various MATLAB scripts deliver up to 1–6 image pairs per second. SynthPix was developed to enable on-the-fly dataset production at rates two to four orders of magnitude higher. This supports reinforcement learning regimes that iteratively optimize PIV extractor parameters and enables fast prototyping and deployment of feedback control loops dependent on real-time flow imagery (Terpin et al., 10 Dec 2025).

2. Algorithmic Pipeline

SynthPix generates a batch of BB image pairs of dimension H×WH\times W through several vectorized stages:

  1. Particle Seeding Density Selection: For each field in the batch, a “particles-per-pixel” parameter pppppp is sampled in [pppmin,pppmax][\text{ppp}_\text{min}, \text{ppp}_\text{max}], giving N=round(ppp×H×W)N = \mathrm{round}(ppp \times H \times W) total particles per image.
  2. Particle Initialization: For Image 1, each particle ii is assigned:
    • Position: (x0,i,y0,i)Uniform([0,H]×[0,W])(x_{0,i}, y_{0,i}) \sim \mathrm{Uniform}([0, H] \times [0, W])
    • Intensity peak: I0,i[I0,min,I0,max]I_{0,i} \sim [I_{0,\min}, I_{0,\max}]
    • Widths: σx,i,σy,i[σmin,σmax]\sigma_{x,i}, \sigma_{y,i} \sim [\sigma_{\min}, \sigma_{\max}]
    • Correlation: ρi[ρmin,ρmax]\rho_i \sim [\rho_{\min}, \rho_{\max}] Each particle contributes an anisotropic Gaussian intensity patch:

Ii(x,y)=I0,iexp(12(1ρi2)[(xx0,i)2σx,i22ρi(xx0,i)(yy0,i)σx,iσy,i+(yy0,i)2σy,i2])I_i(x, y) = I_{0,i} \exp\left( -\frac{1}{2(1-\rho_i^2)} \left[ \frac{(x-x_{0,i})^2}{\sigma_{x,i}^2} - 2\rho_i \frac{(x-x_{0,i})(y-y_{0,i})}{\sigma_{x,i}\sigma_{y,i}} + \frac{(y-y_{0,i})^2}{\sigma_{y,i}^2} \right] \right)

  1. Image 2 (Flow Propagation): Each particle is advected by the ground-truth flow (u,v)(u,v):

(x1,i,y1,i)=(x0,i+u(x0,i,y0,i),  y0,i+v(x0,i,y0,i))(x_{1,i}, y_{1,i}) = (x_{0,i} + u(x_{0,i}, y_{0,i}),\; y_{0,i} + v(x_{0,i}, y_{0,i}))

Blob parameters are perturbed via zero-mean Gaussian noise. Each particle may be randomly hidden (intensity set to zero) with probability phidep_\text{hide}, modeling physical entrainment and optical dropout.

  1. Rasterization and Aggregation: For every particle, a Gaussian patch is rasterized in its local window, with the total image computed by discrete summation:

Itotal(x,y)=i=1NIi(x,y)I_\text{total}(x, y) = \sum_{i=1}^N I_i(x, y)

Global sensor noise (Gaussian or Poisson) is added, and histogram matching may be applied.

  1. Batch Output: Both images and associated ground-truth flow fields are batched for iterative downstream consumption.

3. JAX Implementation and Accelerator Optimization

All computation in SynthPix is implemented using pure Python and JAX to leverage XLA compilation and functional parallelism:

  • Per-particle parallelism: The core patch generation routine is vectorized using jax.vmap along the particle axis.
  • Batch parallelism: Full image-pair batches are processed via a second-level vmap; further, device-level parallelism is available through jax.pmap for multi-GPU/TPU execution.
  • Data Layout: Images are stored as [batch, 2, H, W], flows as [batch, 2, H, W], and per-particle metadata as [batch, N, ...].
  • I/O hiding: Upstream flow fields are loaded and staged in a background thread to hide disk or network latency by pre-fetching batches to device memory.
  • JIT compilation: All critical branches are JIT-compiled, ensuring pipeline latency is measured in milliseconds and end-to-end throughput is maximized (Terpin et al., 10 Dec 2025).

4. Performance Benchmarks

SynthPix achieves unprecedented synthetic PIV image-pair generation rates:

System Throughput (image pairs/sec) Hardware/Batch
SynthPix (CPU) 55 AMD Threadripper, B=1
SynthPix (GPU) 10,477 (B=1) RTX 4090
SynthPix (GPU) 22,538 (B=256) RTX 4090
SynPIVimage (CPU) 0.89 Baseline comparison
PIVlab (CPU) 5.97 Baseline comparison

Performance scales linearly with the number of accelerators and is primarily limited by particle count, maximal particle size, and aggregate image resolution. Throughput saturates beyond B16B \approx 16 as per-device resources reach capacity. Batch size and image dimensions drive only mild or linear slowdowns, establishing suitability for arbitrary field or patch configuration (Terpin et al., 10 Dec 2025).

5. Configuration, User API, and Integration

SynthPix exposes a YAML/JSON-driven configuration describing every generation parameter:

  • Image and batch: height, width, batch size
  • Flow field source: File format, flows/batch, and reuse count
  • Particle scattering: pppppp range, σ\sigma range, ρ\rho range, intensity and diameter bounds, hide probability
  • Noise/optics: Sensor noise, Poisson/Gaussian parameters, histogram matching
  • Device selection: CPU, single or multiple GPU/TPU identifiers

The Python API enables integration with machine learning initialization and training loops. For example:

1
2
3
4
5
6
7
8
9
10
11
import synthpix
sampler = synthpix.make("config.yaml")
batch = next(sampler)
images1, images2 = batch.images1, batch.images2  # [B,H,W]
flows = batch.flow_fields                        # [B,2,H,W]

while not done:
    batch = next(sampler)
    flow_est = agent.step(batch.images1, batch.images2)
    reward = -epe(flow_est, batch.flow_fields)
    agent.update(reward)

Latency can be measured over multiple batches to inform pipeline scheduling.

6. Limitations and Future Extensions

The current implementation assumes orthographic, 2D flows with no depth-of-field, lens distortion, CCD fill-factor, or spectral interference when particle masks overlap. Planned extensions include:

  • Full 3D particle scattering and depth-of-field effects
  • Non-orthogonal and projective camera models
  • Fill-factor correction, non-Gaussian PSFs, and spectral-domain summation
  • Variable illumination modeling and explicit motion blur effects
  • Integration with differentiable-physics and differentiable-rendering stacks

These enhancements will further increase the physical realism of outputs and extend hardware capabilities as new accelerator architectures emerge (Terpin et al., 10 Dec 2025).

7. Significance and Impact

SynthPix sets a new standard for PIV synthetic data generation, enabling research groups to train and benchmark flow estimation and control systems across millions of batches with minimal resource overhead. Its speed and configurability facilitate systematic evaluation of algorithmic performance, robust controller synthesis, and exploratory research into model-based and data-driven fluid dynamics under realistic optical conditions. By consolidating PIV image simulation, flow field augmentation, and accelerator-level parallelism in a single platform, SynthPix actively catalyzes development in machine vision for experimental and computational fluid mechanics (Terpin et al., 10 Dec 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Whiteboard

Follow Topic

Get notified by email when new papers are published related to SynthPix.