Upgrade OpenSfM and fix pixi-build integration#2053
Conversation
installed via pypi to avoid conflicts with pyarrow/libparquet
…ild env to crash opensfm
…od lib separation
…aders mandatory for OpenSfM after upgrade
…with Makefile dir creation
|
Doh, I didn't see this announcement! https://community.opendronemap.org/t/opensfm-1-0/26803 I'll update OpenSfM used in this PR and in the image 😅 EDIT: results from the ghcr.io/opendronemap/odm:2026-07-17-latest-opensfm image not based on the latest OpenSfM, but on the PR made by Yann a while back attached. |
must take full projected coords and reproject into local ODM frame
…uracy opensfm no longer supports planar algo, and applies anisotropic GPS weighting
Built a new image: docker build \
--build-arg IMAGE_VERSION=2026-07-18-opensfm-v1 \
--build-arg GIT_COMMIT="$(git rev-parse HEAD)" \
--build-arg BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
-t ghcr.io/opendronemap/odm:2026-07-18-opensfm-v1 \
-f Dockerfile .Now we have these for testing:
docker run -it --rm \
-v ./odm-test-full:/datasets \
-v ./odm-test-images:/datasets/project/images \
ghcr.io/opendronemap/odm:2026-07-18-opensfm-v1 \
--project-path /datasets project \
--dsm --dtm --pc-quality low --dem-resolution 5 --orthophoto-resolution 5Running the |
we aren't using opensfm dense yet, but the dependencies are imported on opensfm use so must be added here
|
@spwoodcock, I am not sure you are fully aware of where you are getting into :) We hold our own custom copy of OpenSfM; it is not a matter of just "picking the latest" OpenSfM: OpenSfM. The process would be to sync our ODM:OpenSfM fork with OpenSfM:OpenSfM (which is [260 commits ahead of] and [290 commits behind] mapillary/OpenSfM:main) Now of those 260 commits, I reckon for a quick overview that around 200 are no longer needed (either were patches on OpenSfM, or no longer relevant), that still leaves several dozen commits that need to be evaluated and decided what to do with. Granted that many are glue code, but I see some actual CV features there. Bringing OpenSfM:OpenSfM-v1.0 is absolutely valuable, apart from those 290 commits on Mapillary, it includes the latest efforts from Yann over the last year. Knowing all this, please note that there is no shame in handing it over to me; I'll be happy to tackle this beast. |
|
oats output: Logs from tag 3.6.0 vs opensfm-v1-latest: EDIT: I noticed these were clobbered with old old runs & some resumed from previous outputs... rerunning oats with |
Thank you!! You are totally right that this was an underestimation from the start. I thought I would just have a mess around with the latest OpenSfM, but as you say, there are quite a few more custom patches to be added to play nicely with the existing OpenSfM code =) Hopefully some of this work is helpful somewhere for the pixi integration or OpenSfM upgrade. But other than that, I'm more that happy for this to be closed and superseded 😁 |
Fixes #2009
Fixes #1745
Fixes OpenDroneMap/OpenSfM#45
This PR
pixibranch and thought I would try to pull in the latest changes by Yann to OpenSfMoatswith the final image, to see where we get to.I had to make one small tweak to the OpenSfM PR: Small fix for PR #46 OpenSfM#49pixibranch: 1b3f572 2038f0d and 6c47d7f as they seemed more general fixes for the build.I want to make it very clear that this PR is mostly for fun, to see what is possible with the latest OpenSfM, and what breaks. A more thorough attempt should be made to actually integrate this properly. Hopefully the debugging here helps inform that future attemp
Details
osfm.pyslightly to make it work with latest OpenSfM.rerun-sdkwas required by OpenSfM.gperftoolsto be prod-only (not build), else ODM crashed.pixi.tomlto correctly pick up all the built libs at runtime.The resulting build
I have pushed
ghcr.io/opendronemap/odm:2026-07-17-latest-opensfmfor anyone to test out 🙏EDIT: damn, I just realised https://github.com/orgs/OpenDroneMap/packages/container/odm/settings is private. If anyone with repo access could make it public, it would be a big help!
EDIT2: I made the image available here for now:
ghcr.io/spwoodcock/odm:2026-07-17-latest-opensfmTesting
A small test to check all the outputs.
I plan to set up a server and run the image through
oatsnext.I only tested on Linux, via containerd (docker).
As far as I see, everything looks cross platform. The only uncertainty is FPCFilter, which should be test compiled on Windows / Mac to be sure.
Test Data
13 photos captured by a DJI Mini 4 Pro:
https://drive.google.com/drive/folders/1HhH4n2f0qnZJRSrzfM9VdtABhGttCB7a?usp=sharing
Test Command
This ran in about 7 mins or so on my machine - much quicker than I ever remember ODM running!
Outcome
See outputs / logs below for full details.
The numbers all confirm:
Outputs / Logs
Ortho
Ortho looks great, correctly georeferenced, accurate colours.
DSM
Point Cloud