ohirose/bcpd
Domain Elastic Transform / Bayesian Coherent Point Drift
Overview
DET/BCPD is an open‑source C‑based toolbox for probabilistic registration of point clouds and of high‑dimensional functions defined on irregular domains. It implements several related algorithms:
| Method | What it does | Typical use‑cases |
|---|---|---|
| DET (Domain Elastic Transform) | Jointly aligns geometry and functional values without voxelising the data. | Spatial‑transcriptomics, medical images, audio signals defined on irregular grids. |
| BCPD (Bayesian Coherent Point Drift) | Non‑rigid point‑set registration using a Bayesian correspondence model and a smooth deformation prior. | 3‑D shape analysis, reconstruction, shape transfer. |
| GBCPD | Extends BCPD with a surface‑aware (geodesic) kernel, keeping points that are close in space but far on the underlying surface apart. | Complex surfaces, partial‑shape overlap. |
| DLD (Dependent Landmark Drift) | Fits a statistical shape model (landmark‑based) to noisy target points. | Fitting known anatomical templates, morphable‑model fitting. |
| ++ variants (DET++, BCPD++, …) | Down‑sample the data, run the full‑resolution algorithm on the sample, then interpolate the displacement field. | Large‑scale datasets where the naïve algorithm would be too slow. |
All methods are training‑free; they perform unsupervised variational Bayesian inference at run‑time.
Quick start (Linux/macOS)
# 1. Install OpenMP and OpenBLAS (macOS example)
brew install libomp openblas
# 2. Clone and build
git clone https://github.com/ohirose/bcpd.git
cd bcpd
make
The resulting executable is ./bcpd. A pre‑built Windows binary is shipped in win/bcpd.exe.
Running a demo (Python wrapper)
The repository ships Python demo scripts that call the compiled binary and visualise the result.
conda create -n bcpd-demo python=3.12 pip
conda activate bcpd-demo
pip install -r demo-python/requirements.txt
# download demo data (example: monkey point clouds)
# unzip into the repository's `data/` folder
python demo-python/bcpd/nonrigid.py monkey-a
An animation window appears, followed by a before/after view of the registration.
Core concepts & options
- Inputs – point sets are plain text matrices (
N×D). For DET you also supply a matching matrix of functional values (N×D'). - Transformation models – selectable with
-T…flags (rigid, similarity, affine, non‑rigid, etc.). - Regularisation – controlled by
-l(lambda) and-b(beta) which set the stiffness of the deformation field. - Outlier handling –
-wsets the prior probability that a source point has no correspondence. - Kernel choice – Gaussian kernel is default; alternatives (
-G1,-G2,-G3) or a geodesic kernel (-G geodesic,…) can be used, the latter being essential for GBCPD. - Acceleration –
-Aturns on the built‑in Nystrom/K‑D‑tree speed‑ups and the down‑sampling‑plus‑interpolation pipeline used by the++variants.
When to use which method
| Situation | Recommended algorithm |
|---|---|
| Align two 2‑D/3‑D point clouds with unknown non‑rigid deformation | BCPD (or BCPD++ for large clouds) |
| Align point clouds that lie on a known surface mesh, and you need to respect surface topology | GBCPD (or GBCPD++) |
| Register a spatial‑omics dataset where each coordinate carries a high‑dimensional gene‑expression vector | DET (or DET++) |
| Fit a pre‑learned statistical shape model to noisy data | DLD |
Documentation & further reading
- Paper – Domain Elastic Transform: Bayesian Function Registration for High‑Dimensional Scientific Data (TPAMI 2026). Open‑access pre‑print on arXiv: 2603.21235.
- Tutorial – a step‑by‑step PDF with screenshots (linked in the README).
- Quick reference – a two‑page cheat‑sheet summarising command‑line flags.
- Demo videos – short YouTube clips showing DET on spatial transcriptomics, BCPD shape transfer, etc.
Who might find this useful?
- Computational biologists working with spatial‑omics or other irregular‑grid measurements.
- Computer‑vision or graphics researchers needing a robust, unsupervised non‑rigid registration engine.
- Anyone building pipelines that must align large point clouds without training a deep network.
License & citation
The code is released under an open‑source licence (the README does not specify which, but the repository is public). If you use the software in research, cite the appropriate paper(s) listed in the Citation section; BibTeX entries are provided in CITATION.bib.
Bottom line: DET/BCPD is a mature, peer‑reviewed C library for Bayesian, non‑rigid registration of points and functions, with scalable “++” variants and a set of ready‑to‑run Python demos.
Related
- Project
- Project
- Project
- Dispatch
- Project