An example dataset is available at data/berlin. Reconstruct it by running:
bin/opensfm_run_all data/berlinThis runs the entire SfM pipeline and produces data/berlin/reconstruction.meshed.json as output.
First, build the OpenSfM Docker image as described in building.
Start a Docker container, mounting the data/ folder:
docker run -it -p 8080:8080 -v ${PWD}/data/:/data/ opensfm.ubuntu24 /bin/bashInside the container, run the reconstruction:
bin/opensfm_run_all /data/berlin/When done, exit with Ctrl+d. The model will be available in the data/ directory.
A web-based viewer is included. Start it with:
python viewer/server.py -d path/to/datasetFor a denser point cloud:
bin/opensfm undistort data/berlin
bin/opensfm dense_clustering data/berlin
bin/opensfm compute_depthmaps data/berlin
bin/opensfm fuse_depthmaps data/berlin
bin/opensfm dense_merging data/berlinThis runs dense multi-view stereo and produces a dense point cloud at data/berlin/undistorted/depthmaps/fused.ply (along with a mesh.ply, a DSM and an orthophoto). Visualize the cloud with MeshLab or any viewer supporting PLY files.
- Put images in
data/DATASET_NAME/images/ - Optionally copy
data/berlin/config.yamltodata/DATASET_NAME/config.yaml - Run the full pipeline:
bin/opensfm_run_all data/DATASET_NAMEOr run steps individually (see pipeline commands):
bin/opensfm extract_metadata data/DATASET_NAME
bin/opensfm detect_features data/DATASET_NAME
bin/opensfm match_features data/DATASET_NAME
bin/opensfm create_tracks data/DATASET_NAME
bin/opensfm reconstruct data/DATASET_NAMESee dataset structure for the expected folder layout and configuration reference for tuning options.