fix: macOS arm64 build support + standalone pipeline compiled binary runner CLI#1120
fix: macOS arm64 build support + standalone pipeline compiled binary runner CLI#1120genie360s wants to merge 3 commits intomapillary:mainfrom
Conversation
|
Hi @genie360s! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Summary
Two distinct improvements:
setup.py.opensfm_runner.pyentry point and PyInstaller spec that produce a self-contained binary with a full CLI, per-step subcommands, and a built-in validation test suite.1. Build fixes (macOS arm64)
CMake — transitive
PUBLIClinkage for Ceres/Eigen headersOn macOS arm64 with the system Clang toolchain, targets that consume Ceres or Eigen headers through a library boundary fail to compile unless those dependencies are propagated as
PUBLIC. Four files changed:opensfm/src/bundle/CMakeLists.txt${CERES_LIBRARIES}→PUBLICopensfm/src/geometry/CMakeLists.txtfoundation+${CERES_LIBRARIES}→PUBLICopensfm/src/robust/CMakeLists.txtgeometrymoved fromPRIVATEtoPUBLICopensfm/src/sfm/CMakeLists.txtbundlemoved fromPRIVATEtoPUBLICThese are the minimal changes required; no public API surfaces change.
setup.pyfrom sphinx.setup_command import BuildDocraisedImportErrorwhen Sphinx was not installed, blocking the entire build. Wrapped intry/except—BuildDocgracefully becomesNone.$CONDA_PREFIXis set, automatically injectsEigen3_DIR,Ceres_DIR, and-I<include>into the CMake invocation. No-op in standard pip installs..gitignoreAdded
.venv/.2. Standalone pipeline runner (
opensfm_runner)CLI
runextract_metadatadetect_featuresmatch_featurescreate_tracksreconstructexport_plytest--jsonemits newline-delimited JSON progress events on stdout (for programmatic consumers such as Tauri desktop apps).opensfm_runner <dataset>(no subcommand, JSON output) is preserved for backward compatibility.--helpprints the full manual including pipeline order, output file descriptions, and usage examples.Built-in test suite
opensfm_runner test <dataset>runs all six pipeline steps from a clean state and validates 16 expected outputs:extract_metadata—exif/directory, one EXIF file per image,camera_models.jsondetect_features—features/directory, one.features.npzper image, non-emptymatch_features—matches/directory, ≥1 match file,reference_lla.jsoncreate_tracks—tracks.csvexists and is non-emptyreconstruct—reconstruction.jsonis valid JSON, contains ≥1 reconstruction, shots count > 0export_ply—reconstruction.plyexists and is non-empty--no-cleanskips the pre-run cleanup to validate an existing output directory.requirements.txtAdded pinned runtime dependencies for reproducible environment setup.
Testing
data/lund(29 images)exit 0