Do you know if Josm image viewer handles the roll/pitch xmp tags ? It would be nice to run the algorithm locally before pre processing the photo geolocalisation in josm. From a quick test, it doesn’t seem to.
This should not be too complex to add it only changes the reprojection matrix.
I forked @seen-one’s GeoCalib so that the same algorithm can be called from command line on any set of image files. It can save XMP Tags following prediction in the image files.
GitHub - nuxper/GeoCalib: GeoCalib: Learning Single-image Calibration with Geometric Optimization (ECCV 2024) · GitHub
Ca marche nickel
$ git clone git@github.com:nuxper/GeoCalib.git
$ python3 -m venv env_360
$ source env_360/bin/activate
$ pip install -r requirements.txt
$ pip install py360convert
$ pip install -e .
$ time .360/cli.py --file ~/Perso/gopro/20260323/20260321_80/GSAG7529.JPG --inlier-threshold-deg 2 --sample-count 36 --fov 60
[04/03/2026 10:02:14 geocalib.lm_optimizer WARNING] Reached maximum number of steps without convergence.
Roll: -0.972°
Pitch: 41.487°
Inliers: 11/36 (30.6%)
MAE (inlier): 1.252°
RMSE(inlier): 1.358°
real 1m13.802s
user 9m43.340s
sys 1m5.806s
Vous avez quoi comme paramètres satisfaisants et mettent moins de 1m13 ?
In Lyon, in an urban environment, a sample count of 4 seems to work well — increasing it to 16 or 32 doesn’t make much of a difference. On my laptop with an Intel CPU only, processing takes about 4 seconds per image when running on a batch, and around 10 seconds for a single image due to the initial model loading.
You can use --write-exif to write the prediction results to the JPG file’s GPano tags.
To check the GPano tags:
exiftool -XMP-GPano:PosePitchDegrees -XMP-GPano:PoseRollDegrees GSAM1831.JPG
I then use Playground | Photo Sphere Viewer to verify the result.
Note: After some testing, I settled on:
-
XMP-GPano:PosePitchDegrees=-pitch(negative) -
XMP-GPano:PoseRollDegrees=+roll(positive)
I haven’t fully understood why yet, so any feedback on this would be welcome.
Tip: I personally use uv. After running uv tool install --reinstall ./360, you can run the following command from any folder:
geocalib-360 --write-exif --sample-count 4 --file *.JPG
275175 pictures processed so far by the panoflat bot…
With some optimizations processing one picture takes between 1 to 1.5s on my workstation (with an RTX 4090), including low-res picture download and API calls to update the metadata.
As we can now update pitch/roll/(yaw ?) on uploaded sequences, I’ve added Panoramax support on my visual axes corrector on GitHub - qhess34/pan360-fixexif · GitHub
The large batch on 360° pictures shot from bike have now been processed.
More than 650 000 pictures have been processed.