Skip to content
zachtongPublic

About

Augmented Lagrangian Digital Volume Correlation (AL-DVC) in Python

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

pyALDVC: augmented Lagrangian digital volume correlation in Python

pyALDVC: A Python Implementation of Augmented Lagrangian Digital Volume Correlation

3-D displacement and strain, inside the material

Open-source digital volume correlation for micro-CT, confocal and other 3-D scans:
a desktop application, a command line and a Python library, with optional GPU acceleration.

Visit the website

Website: zachtong.github.io/pyALDVC
cases, how it works, accuracy and speed, all in one page

Get started Windows download User guide

PyPI version CI status: tested on Python 3.10 to 3.12 Interface in 7 languages Zenodo DOI 10.5281/zenodo.22883767 BSD 3-Clause licence

Orbiting 3-D view of a hydrogel block with a circular dimple of downward displacement and arrows around it
Sphere indentation of a hydrogel, confocal scan of 1024 × 1024 × 306 voxels: vertical displacement on the deformed node grid, down to −10.5 voxels (−4.5 µm) under the sphere; 144,342 nodes in 71 s on one GPU. Measured with pyALDVC (local subset solver).

Key numbers: 34 s on one NVIDIA RTX 5090 for a 1024 × 1024 × 306 confocal pair with 79,200 nodes (5.0 min on a 24-core CPU); 0.001 to 0.006 voxel displacement error on synthetic translation, rotation and 2 % strain; 0.005 to 0.020 voxel median difference from the MATLAB ALDVC code on the same scan; about 14 GB of volume memory for a masked 1024³ pair, from the memory model (was 53 GB); texture analysis of a 256³ volume in 1.2 s; 7 interface languages

pyALDVC measures full-field displacement and strain inside a material from a sequence of 3-D scans. It is the Python version of the MATLAB ALDVC code (Yang, Hazlett, Landauer, Franck, Exp. Mech. 2020) and the volumetric sibling of pyALDIC: free, open source, and usable without writing a line of code.

Cases

Foam cylinder with orthogonal micro-CT slices; a colour map of displacement magnitude sweeps through it
Foam under compression
Micro-CT slices, 987 × 1009 × 1856 voxels
Foam cylinder drawn as a node grid coloured by displacement, with arrows along the compression axis
Foam: displacement on the node grid
48,720 nodes in about 3 min; deformation exaggerated 2×
A cube of synthetic beads, coloured by horizontal displacement, rotating step by step
Rigid-body rotation
Synthetic, six 5° steps to 30° (looped forward and back); tracked in 34 s
Residual von Mises strain left by laser-induced cavitation
Laser-induced cavitation
Residual von Mises strain (unpublished data)

The full cases, with the experiments behind them, on the website →

The foam, hydrogel and rotation fields were measured with pyALDVC (local subset solver) on one GPU. Their data are part of the DVC Challenge 2.0 dataset, doi:10.18434/mds2-4129, described in Tong, Z. et al. Digital Volume Correlation Challenge 2.0: A Comprehensive Dataset for Digital Volume Correlation Benchmarking. Research Square preprint (2026). https://doi.org/10.21203/rs.3.rs-9683321/v1. Foam data courtesy of NIST (Landauer et al., Sci. Data 10, 356, 2023).

What it does

Point and click
Load the scans, draw the region of interest on the slices, run and export, in seven languages. No code.
AL-DVC solver
Local subset fits coupled to one smooth, compatible field: cleaner gradients, and masked cracks and holes stay sharp.
NVIDIA GPU
pip install "al-dvc[gpu]" runs the local solvers as CUDA kernels, typically within 10−5 voxel of the CPU.
Large volumes
Streamed frames, on-the-fly gradients and sub-box local steps: a masked 1024³ pair needs about 14 GB (memory model).
Texture analysis
Measures the correlation length of your scan and suggests the subset size and step.
Strain
Four gradient methods × four measures (infinitesimal, Green–Lagrange, Euler–Almansi, Hencky).
Statistics and rigid-body motion
Means with 95 % confidence intervals, the noise floor, regions, profiles, a virtual extensometer.
3-D view and animations
Field slices, the deformed node grid and arrows; orbits and sweeps recorded as GIF or MP4.
Formats
TIFF, MATLAB, NumPy, HDF5, NIfTI, NRRD, DICOM in; NumPy, MATLAB, CSV, ParaView, PDF out.
Sessions, batch, command line
Save sessions with the results and every setting (found again when the project moves), queue batches, resume from checkpoints, or script it with al-dvc and al_dvc.run_aldvc.

How it works

The method, and the tools that tell you how far to trust a result. Every figure is computed from synthetic volumes with a known answer, by a script in this repository. The website explains each one in full, with the AL-DVC method itself.

Tracking a sequence. Accumulative tracking (the default) correlates every scan with the first, so errors do not add up; incremental tracking correlates each scan with the one before and chains the steps, and follows motion too large for one step.

Median error and converged nodes of accumulative and incremental tracking of a cylinder turning 5 degrees between scans, up to 45 degrees

Texture analysis. How far the grey values stay correlated sets the subset size: four correlation lengths per axis, past which a larger subset barely lowers the error.

A synthetic sphere texture with subsets of 1, 2 and 4 correlation lengths, and the displacement error against subset size

How precise is the result? A noise floor from static scans, the predicted error of every node, and confidence intervals that account for correlated neighbours.

Predicted displacement uncertainty, actual error and their calibration where the texture contrast fades

Removing rigid-body motion. A specimen that shifts or turns adds displacement that is not deformation, and a rotation reads as false strain. A closed-form rigid fit removes it and reveals the deformation underneath.

Displacement arrows as measured and with the rigid motion removed, and the mean normal strains

Accuracy and speed

Test Result
Synthetic rigid translation or 2 % strain 0.003–0.006 voxel error
Synthetic 5° rotation about the z axis 0.001 voxel error
Synthetic translation (12.3, −9.6, 7.4) + 1 % strain 0.004–0.005 voxel error
Synthetic 2 % strain with noise (SNR 6) 0.011–0.012 voxel error
Confocal pair, 1024 × 1024 × 306, 79,200 nodes 34 s on one RTX 5090 (5.0 min on a 24-core CPU)
Same pair, against MATLAB ALDVC (u, v, w) median difference 0.005 / 0.006 / 0.020 voxel
Masked 1024³ pair about 14 GB of volume memory, from the memory model (was 53 GB)

Synthetic rows: RMS error of each displacement component at the interior nodes, subset 16, step 8 voxels, default settings. Confocal rows: subset 32, step 8 voxels, with the settings of the MATLAB example run. Tested on Python 3.10, 3.11 and 3.12 on every push to main.

Coming from the MATLAB ALDVC code?
MATLAB ALDVC pyALDVC
Interface scripts desktop application in 7 languages, command line, Python library
GPU – NVIDIA CUDA, one install flag
Region of interest box masks drawn on the slices, automatic masks, per-frame masks
Subset size by hand suggested by texture analysis of the scan
Cracks and holes subsets and smoothing reach across them masked cracks and holes split the subsets and the node grid
Strain and statistics in the run; mean and std of uniform strain own window: 4 methods × 4 measures, regions, confidence intervals, series over frames, profiles, extensometer, noise floor, rigid-body motion removed
Large scans, long sequences whole volume in memory local steps over sub-boxes, streamed frames, gradients on the fly; checkpoints, resume, batch runs, sessions
Install MATLAB licence pip install al-dvc, or a portable Windows bundle

Install

conda create -n pyaldvc python=3.12 -y
conda activate pyaldvc
pip install al-dvc
al-dvc

pip install "al-dvc[gpu]" in place of the third line adds NVIDIA GPU support; it needs the NVIDIA driver, not the CUDA Toolkit. The last command opens the application, and al-dvc --self-test checks the install. Optional: nibabel, pynrrd and pydicom read NIfTI, NRRD and DICOM; imageio with imageio-ffmpeg records MP4.

Update to the latest release in the same environment:

conda activate pyaldvc
pip install --upgrade al-dvc

With the GPU flavour, run pip install --upgrade "al-dvc[gpu]" instead, so the GPU packages are updated too. The version is in the window title and under Help > About; your settings are kept. For the portable bundle, download the new zip and use it in place of the old folder.

No Python? Every release ships a portable Windows bundle (CPU only; for NVIDIA GPU acceleration, install with pip as above): unzip it and double-click pyALDVC.exe. Then read the user guide.

Citation

If pyALDVC helps your research, please cite the software (the concept DOI always resolves to the latest release) and the method:

Tong, Z., Yang, J. pyALDVC: Augmented Lagrangian Digital Volume Correlation in Python. Zenodo (2026). https://doi.org/10.5281/zenodo.22883767

Yang, J., Hazlett, L., Landauer, A. K., Franck, C. Augmented Lagrangian Digital Volume Correlation (ALDVC). Experimental Mechanics 60, 1205–1223 (2020). https://doi.org/10.1007/s11340-020-00607-3

BibTeX
@software{tong_pyaldvc,
  author    = {Tong, Zixiang and Yang, Jin},
  title     = {{pyALDVC}: Augmented Lagrangian Digital Volume Correlation in Python},
  publisher = {Zenodo},
  year      = {2026},
  doi       = {10.5281/zenodo.22883767},
  url       = {https://github.com/zachtong/pyALDVC}
}

@article{yang_aldvc_2020,
  author  = {Yang, Jin and Hazlett, Lauren and Landauer, Alexander K. and Franck, Christian},
  title   = {Augmented {Lagrangian} Digital Volume Correlation ({ALDVC})},
  journal = {Experimental Mechanics},
  volume  = {60},
  number  = {9},
  pages   = {1205--1223},
  year    = {2020},
  doi     = {10.1007/s11340-020-00607-3}
}

Licence

BSD 3-Clause. Developed by Zixiang Tong and Jin Yang in Dr. Jin Yang's group at The University of Texas at Austin.

Visit the website

About

Augmented Lagrangian Digital Volume Correlation (AL-DVC) in Python

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages