SfM Tool
A tool for creating and exploring Structure from Motion (SfM) reconstructions, built on COLMAP and OpenCV.
Under construction - project is being restructured to better fit what it evolved into.
Components
sfmCLI - Create workspaces, run SfM solves, and inspect reconstructions- SfM Explorer GUI - View reconstructions in 3D, explore tracks and camera rays
- Python bindings - Access SfM functionality from Python via
sfmtool-py
Quick Start
# Create a workspace with your images
mkdir -p workspace/images
cp /path/to/images/*.jpg workspace/images/
cd workspace
# Initialize and solve
sfm ws init .
sfm solve -g images/
# Inspect the result
sfm inspect sfmr/[filename].sfmr
Convert videos to image sequences
To try many different things with a particular 3D reconstruction, having the
data as a video complicates individual frame access. Therefore the sfm command expects you
to always convert to images first.
Here's an example of using ffmpeg to convert a
single video in the current directory into a sequence of images in a frames
subdirectory:
# Assumes there's one video in the current directory
VIDEO_FILE=$(echo *.mp4)
IMAGE_BASE=$(basename "$VIDEO_FILE")
IMAGE_BASE=${IMAGE_BASE%.*}
mkdir -p frames
ffmpeg -i "$VIDEO_FILE" \
-qscale:v 2 \
frames/"${IMAGE_BASE}_%04d.jpg"
Building
This project uses Pixi for environment management with Rust and Python.
# Run the Sfm Explorer GUI
pixi run gui
# Run tests
pixi run test
# Serve docs locally
pixi run docs-serve
Project Structure
crates/
sfmtool-archive-io/ Shared ZIP + zstd container primitives
sfmtool-sfmr-format/ .sfmr reconstruction file I/O
sfmtool-sift-format/ SIFT feature file I/O
sfmtool-matches-format/ Feature matches file I/O
sfmtool-camrig-format/ .camrig camera-rig file I/O
sfmtool-kdf-format/ .kdf kd-forest file I/O
sfmtool-colmap/ COLMAP integration
sfmtool-core/ Core project functionality
sfm-explorer/ SfM Explorer GUI
sfmtool-py/ Python bindings
License
Apache-2.0
Metadata
Release files for sfmtool 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sfmtool-0.3.tar.gz | 4.5 MB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sfmtool-0.3-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
| sfmtool-0.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.17+ x86-64 | Details |
| sfmtool-0.3-cp314-cp314-macosx_11_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 11.0+ ARM64 | Details |
Total release size: 65.2 MB
Release files / sfmtool-0.3.tar.gz
| Download URL | sfmtool-0.3.tar.gz |
|---|---|
| Size | 4.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cd5467dedc94d9e9bf7de40795875f0d366c8174876cd8a33091be6637b2400
|
|
BLAKE2b-256 checksum How to use checksums |
1c1723c30b7b28e0c35c27c9733adfdc684c590ea8399fdb73eb5176ed608850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sfmtool-0.3-cp314-cp314-win_amd64.whl
| Download URL | sfmtool-0.3-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 19.1 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9d1002ec19f0d566d6608b517e793b387e37759288c042b0af7aa0a8b903c913
|
|
BLAKE2b-256 checksum How to use checksums |
e98d98c21cd5d572039bdf11fbcdcafc8e1e0c6b66b05d7fbcfbdb7467fd1b56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sfmtool-0.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | sfmtool-0.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 23.6 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
619639a960316aae1b4b3da59239be8ff72262e5a02b9f4252c5b91c598862b1
|
|
BLAKE2b-256 checksum How to use checksums |
8b250b4e850548f60eb5520024e2c09a0d93148231ec2e65eca53d4510a78525
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sfmtool-0.3-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | sfmtool-0.3-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 18.0 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8a5b32483ead1ced3d8c5465907434b05fddc099cf3ad8a2a7f1700cfec5a6af
|
|
BLAKE2b-256 checksum How to use checksums |
0ce60f5403e19587095efaf1a71b85b581140807a86a84ace376953269595f64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log