sfmkit¶
structure from motion · tested library · live 3d viewer
A small, tested Structure-from-Motion library: two-view geometry, feature tracks, incremental reconstruction and bundle adjustment. It rebuilds a place in 3D from modern photographs, places an old photograph in that model, and checks itself against COLMAP.
- cameras
- 14
- points
- 2 850
- mean rotation error
- 0.338°
- old photo error
- 1.32°

What it is given: fourteen photographs of the Plaza de la Virgen taken one
December morning, and one undated print of the same square. The old one is
matched against Img01 alone and kept out of the model; the thirteen underneath
are what build it.
Where was the old photograph taken from, and what has changed since?
sfmkit answers that from a handful of modern photographs of the same place:
- It rebuilds the place in 3D from the modern photographs, and works out where each of them was taken from. The technique is called Structure from Motion.
- It uses the old photograph: places it in that 3D model, recovering where it was taken from even though its camera is unknown, and overlays it on a modern photograph to show what has changed.
- It checks itself against COLMAP, the standard tool for the job, and says how far apart the two answers are.
Start here¶
- Tutorial: from a clone to a reconstruction you can turn around, then the same on photographs of your own.
- Install: three conda environments, or Docker and nothing on the host.
- The pipeline: the ten stages, and how the reconstruction is actually built.
- CLI reference: every command and every option, with the configuration that drives them.
- The viewer: both models in 3D, live while a run is built, with its HTTP API and message format.
- Results: the numbers, the 11.5° argument, and what a bundle adjustment of our own bought.
- Development: the layering, the checks, and CI.
- Questions: COLMAP, GPUs, the weights, and why the old photograph is handled apart.
In one command¶
sfmkit run --config projects/valencia/configs/cpu.yaml # every stage, in order
sfmview --projects projects # look at what it made
The viewer shows a run's two models side by side, each in its own colour, sfmkit in amber, COLMAP in blue, and the old photograph located against them.