mapillary_tools
mapillary_tools copied to clipboard
Mapillary_tools cannot process GoPro videos and throws errors
Basic information
- Release version:
0.7.2
, commit 1f9cfb6 - System: macOS 10.14.6 (18G9216)
- Capture Device: GoPro Hero 8 Black
Steps to reproduce behavior
- run mapillary_tools to process multiple GoPro MP4 videos with GPS coordinates
Expected behavior
- program should create GPS data in EXIF section of each extracted JPEG file
Actual behavior
-
with binary release 0.7.2 an error message for each image file was given: "Warning, geotag process failed for image ..."
-
after updating to commit 1f9cfb6 the above mentioned warning disappeared and a bunch of multiple error was shown
Additional information
-
used command:
mapillary_tools video_process --import_path "IMAGE-PATH" --video_import_path "VIDEO-PATH" --user_name "macsico" --advanced --geotag_source "gopro_videos" --geotag_source_path "VIDEO-PATH" --interpolate_directions --video_sample_interval 1 --overwrite_EXIF_gps_tag
-
error message in Terminal:
Running geotag_process for 2212 images, skipping 0 images.
Traceback (most recent call last):
File "/usr/local/bin/mapillary_tools", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/mapillary_tools/__main__.py", line 93, in main
command.run(args)
File "/usr/local/lib/python3.9/site-packages/mapillary_tools/commands/video_process.py", line 416, in run
process_geotag_properties(
File "/usr/local/lib/python3.9/site-packages/mapillary_tools/process_geotag_properties.py", line 111, in process_geotag_properties
geotag_properties = processing.geotag_from_gopro_video(
File "/usr/local/lib/python3.9/site-packages/mapillary_tools/processing.py", line 215, in geotag_from_gopro_video
gpx_path = gpx_from_gopro(gopro_video)
File "/usr/local/lib/python3.9/site-packages/mapillary_tools/gpx_from_gopro.py", line 73, in gpx_from_gopro
gopro_data = get_points_from_gpmf(gopro_video)
File "/usr/local/lib/python3.9/site-packages/mapillary_tools/gpx_from_gopro.py", line 44, in get_points_from_gpmf
gpmf_data = parse_bin(bin_path)
File "/usr/local/lib/python3.9/site-packages/mapillary_tools/gpmf.py", line 113, in parse_bin
data: bytes = f.read(val_size)
ValueError: read length must be non-negative or -1
- EXIFTOOL was able to sucessfully extract GPS data from each of the affected MP4 video files into a GPX file. Therefore GPS data is definitely present in each file.
Hey, both the reported issue and the date formatting issue should be fixed in master. Please update and retry. Thanks for reporting.
python3 -m pip install --upgrade --force-reinstall git+https://github.com/mapillary/mapillary_tools
Thanks for the new commit.
Now the process itself finishes but throws a warning for every file:
Warning, time t not in scope of gpx file by 6254.836 seconds, interpolation of latitude and longitude failed for image ...
Later in the process it says:
Warning, required geotag_process failed for image ....
NoneType: None
Also being shown:
Warning, sequence process failed for image ....
At the end it tells:
Inserting mapillary image description in image EXIF: 100%
But when asking EXIFTOOL to check all files created for GPS data in the EXIF section, it reports 100% of all files not having GPS data.
I also own an independant GPX file from my Android smartphone which has only a time deviation of 16 seconds from the same location extracted from the GoPro video.
It looks like the video time is out of scope of the time scope in gpx file, and it's 6254.836 seconds behind gpx start time or beyond the end time.Try the option --offset_time=SECONDS
to shift the video time?
--offset_time: time offset between the camera and the gps device, in seconds.
Thanks for the hint. I added
--offset_time=6254.836
.. to the end of my MT command.
It resulted in the following output:
Inserting gps data into image EXIF: 0it [00:00, ?it/s]time t not in scope of gpx file by 0.0 seconds, extrapolating...
time t not in scope of gpx file by 1.0 seconds, extrapolating...
Warning, time t not in scope of gpx file by 2.0 seconds, interpolation of latitude and longitude failed for image ...
Warning, time t not in scope of gpx file by 3.0 seconds, interpolation of latitude and longitude failed for image ...
Warning, time t not in scope of gpx file by 4.0 seconds, interpolation of latitude and longitude failed for image ...
Warning, time t not in scope of gpx file by 5.0 seconds, interpolation of latitude and longitude failed for image ...
Warning, time t not in scope of gpx file by 6.0 seconds, interpolation of latitude and longitude failed for image ...
Warning, time t not in scope of gpx file by 7.0 seconds, interpolation of latitude and longitude failed for image ...
(snip)
Warning, time t not in scope of gpx file by 806.121 seconds, interpolation of latitude and longitude failed for image ...
Again:
Warning, geotag process failed for image
and
Warning, sequence process failed for image
and
Warning, required geotag_process failed for image
It all ended with:
Inserting mapillary image description in image EXIF: 100%
Checking manually and with EXIFTOOL showed me, that with this last run the first 2 images got GPS data and the rest was left without data.
If you would like I can send you an URL to download one of the Gopro videos from my webspace for test purposes for deep inspection. Maybe GoPro changed something in the file or metadata structure???
Hello.
I have thу same problem/
Sample of video: file MP4, 66Mb
command:
mapillary_tools video_process_and_upload --import_path "$IMG_PATH" --video_import_path "$VIDEO_PATH" --user_name sapozhnik --advanced --geotag_source "gopro_videos" --geotag_source_path "$VIDEO_PATH" --interpolate_directions --video_sample_interval 1 --overwrite_EXIF_gps_tag --local_time
listing: `/home/andrey/mapillary/img# sh test.sh ↑ Extracting video frames: 0%| | 0/1 [00:00<?, ?it/s] Video sampling path set to /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221 Warning: detected incorrect stream metadata line format: [SIDE_DATA]
Warning: detected incorrect stream metadata line format: displaymatrix=
Warning: detected incorrect stream metadata line format: 00000000: -65536 0 0
Warning: detected incorrect stream metadata line format: 00000001: 0 -65536 0
Warning: detected incorrect stream metadata line format: 00000002: 1920 1080 1073741824
Warning: detected incorrect stream metadata line format:
Warning: detected incorrect stream metadata line format: [/SIDE_DATA]
Warning: detected incorrect stream metadata line format: [SIDE_DATA]
Warning: detected incorrect stream metadata line format: displaymatrix=
Warning: detected incorrect stream metadata line format: 00000000: -65536 0 0
Warning: detected incorrect stream metadata line format: 00000001: 0 -65536 0
Warning: detected incorrect stream metadata line format: 00000002: 1920 1080 1073741824
Warning: detected incorrect stream metadata line format:
Warning: detected incorrect stream metadata line format: [/SIDE_DATA]
Deriving frame capture time: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 84026.12it/s] Inserting frame capture time: 12it [00:00, 769.22it/s] | 0/12 [00:00<?, ?it/s] Extracting video frames: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:03<00:00, 3.35s/it] Running user_process for 12 images, skipping 0 images. Logging: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 3663.95it/s] Sub process ended Running import_meta_data_process for 12 images, skipping 0 images. Processing image import properties: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 3299.14it/s] Sub process ended Running geotag_process for 12 images, skipping 0 images. Your local timezone is 2021-07-12 22:53:49 EEST. If not, the geotags will be wrong. Reading image capture time: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 5687.19it/s] Inserting gps data into image EXIF: 0it [00:00, ?it/s]Warning, time t not in scope of gpx file by 26.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/ma pillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000001.jpg Warning, time t not in scope of gpx file by 25.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000002.jpg Warning, time t not in scope of gpx file by 24.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000003.jpg Warning, time t not in scope of gpx file by 23.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000004.jpg Warning, time t not in scope of gpx file by 22.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000005.jpg Warning, time t not in scope of gpx file by 21.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000006.jpg Warning, time t not in scope of gpx file by 20.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000007.jpg Warning, time t not in scope of gpx file by 19.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000008.jpg Warning, time t not in scope of gpx file by 18.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000009.jpg Warning, time t not in scope of gpx file by 17.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000010.jpg Warning, time t not in scope of gpx file by 16.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000011.jpg Warning, time t not in scope of gpx file by 15.050002 seconds, interpolation of latitude and longitude failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH 014221_000012.jpg Inserting gps data into image EXIF: 12it [00:00, 7043.33it/s] Sub process ended Running sequence_process for 12 images, skipping 0 images. Loading geotag points: 0%| | 0/12 [00:00<?, ?it/s] Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000001.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000002.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000003.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000004.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000005.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000006.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000007.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000008.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000009.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000010.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000011.jpg, therefore it will not be included in the sequence processing . Warning, geotag process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000012.jpg, therefore it will not be included in the sequence processing . Loading geotag points: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 7449.92it/s] Sub process ended Running upload_params_process for 12 images, skipping 0 images. Processing image upload parameters: 0%| | 0/12 [00:00<?, ?it/s] Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000001.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000002.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000003.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000004.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000005.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000006.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000007.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000008.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000009.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000010.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000011.jpg, therefore it will not be included in the upload params pro cessing. Warning, sequence process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000012.jpg, therefore it will not be included in the upload params pro cessing. Processing image upload parameters: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 5676.93it/s] Sub process ended Running mapillary_image_description for 12 images, skipping 0 images. Inserting mapillary image description in image EXIF: 0%| | 0/12 [00:00<?, ?it/s] Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000001.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000002.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000003.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000004.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000005.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000006.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000007.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000008.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000009.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000010.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000011.jpg NoneType: None Warning, required geotag_process failed for image /home/andrey/mapillary/img/mapillary_sampled_video_frames/GH014221/GH014221_000012.jpg NoneType: None Inserting mapillary image description in image EXIF: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 3776.67it/s] Sub process ended Process done. No images to upload. Please check if all images contain the required Mapillary metadata. If not, you can use "mapillary_tools process" to add them
`
Hey, the fixes are pushed to the master, please update tools:
# use --force-reinstall
python3 -m pip install --force-reinstall --upgrade git+https://github.com/mapillary/mapillary_tools
and try again. If it doesn't work, try the following fixes:
1. Specify --local_time to read the timestamps from the geotag source file as local time
2. Use --use_gps_start_time to align the start time
3. Manually shift the timestamps in the geotag source file with --offset_time OFFSET_IN_SECONDS
If it still doesn't work out, please reopen the issue, and if possible, send your video to "support at mapillary.zendesk.com" we can help debug it.
Thanks!
Thanks. It works for me with
Tried it again today, was busy in the last two weeks.
Used command:
mapillary_tools video_process --import_path "$IMAGE_PATH" --video_import_path "$VIDEO_PATH" --user_name "macsico" --advanced --geotag_source "gopro_videos" --geotag_source_path "$VIDEO_PATH" --interpolate_directions --video_sample_interval 1 --overwrite_EXIF_gps_tag --local_time
Output when running the latest version updated with the force install command:
Traceback (most recent call last):
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/processing.py", line 332, in geotag_from_gps_trace
geotag_properties = get_geotag_properties_from_gps_trace(
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/processing.py", line 358, in get_geotag_properties_from_gps_trace
lat, lon, bearing, elevation = interpolate_lat_lon(gps_trace, capture_time)
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/geo.py", line 230, in interpolate_lat_lon
raise MapillaryInterpolationError(
mapillary_tools.geo.MapillaryInterpolationError: Unable to interpolate the point captured at 2021-07-04 15:55:52.540000 because it is behind the trace start time 2021-07-04 16:03:43.264008 by 470.724008 seconds
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/carstenprivat3/./Library/Python/3.9/bin/mapillary_tools", line 8, in <module>
sys.exit(main())
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/__main__.py", line 93, in main
command.run(args)
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/commands/video_process.py", line 416, in run
process_geotag_properties(
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/process_geotag_properties.py", line 111, in process_geotag_properties
geotag_properties = processing.geotag_from_gopro_video(
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/processing.py", line 194, in geotag_from_gopro_video
geotag_from_gps_trace(
File "/Users/carstenprivat3/Library/Python/3.9/lib/python/site-packages/mapillary_tools/processing.py", line 336, in geotag_from_gps_trace
raise RuntimeError(
RuntimeError: Failed to interpolate image /Volumes/WD120G/01_GoPro-TEMP/2021-07-04-GoPro-Images-abschnitt04/mapillary_sampled_video_frames/GH010849/GH010849_000001.jpg with the geotag source file /Volumes/WD120G/01_GoPro-TEMP/2021-07-04-GoPro-Images-RAW/GH010849.gpx. Try the following fixes:
1. Specify --local_time to read the timestamps from the geotag source file as local time
2. Use --use_gps_start_time to align the start time
3. Manually shift the timestamps in the geotag source file with --offset_time OFFSET_IN_SECONDS
To my surprise, the process created GPX files which showed the correct positions. But no image was extracted and geotagged.
The switches "--local_time" and "--use_gps_start_time" had no measurable effect, at least in my understanding. As no offset applies here I did not test this one.
@ptpt ,would you please check the videos of my GoPro Hero 8 Black?
Affected videos (2 of 3) can be downloaded here:
@ptpt Is it possible that my OS platform does not properly build the software? I just updated both the Ubuntu server at my shared hoster and my local machine with the same command:
pip3 install --upgrade --force-reinstall git+https://github.com/mapillary/mapillary_tools
On macOS I got the warning:
DEPRECATION: Piexif was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Final output of my macOS 10.14 machine:
Successfully installed Piexif-1.0.13m certifi-2021.5.30 chardet-3.0.4 construct-2.8.8 exifread-2.1.2 gpxpy-0.9.8 idna-2.7 mapillary-tools-0.7.3 pymp4-1.1.0 pynmea2-1.12.0 python-dateutil-2.7.3 pytz-2021.1 requests-2.20.0 shapely-1.7.1 six-1.16.0 tqdm-4.61.2 tzwhere-3.0.3 urllib3-1.24.3
FInal output of the Ubuntu server:
Successfully installed Piexif-1.1.3 certifi-2021.5.30 chardet-3.0.4 construct-2.8.8 exifread-2.1.2 gpxpy-0.9.8 idna-2.7 mapillary-tools-0.7.3 pymp4-1.1.0 pynmea2-1.12.0 python-dateutil-2.7.3 pytz-2021.1 requests-2.20.0 shapely-1.7.1 six-1.16.0 tqdm-4.61.2 tzwhere-3.0.3 urllib3-1.24.3
@cmuerau Thanks for providing the videos. I tested processing them locally and all were processed correctly. From the error traces it doesn't seems to be the latest mapillary_tools. Could you make sure mapillary_tools is installed correctly. Currently the latest version is 0.7.4. Check with mapillary_tools --version
.
If pip3 insatll --upgrade ...
does get you the latest tools, then check if it's because pip is too old: pip3 install -U pip
, and then install tools again.
Alternatively you can always download the binaries for your platform here https://github.com/mapillary/mapillary_tools/releases/tag/v0.7.4
@ptpt Thanks for testing my videos. This redirected myself to check my local system a little deeper.
To my surprise, I did not run the latest version of mapillary_tools in my daily user account but in my local admin account where the pip3 installations were applied in the past by me. My former understanding was, that updating mapillary_tools in the privileged account would also update it for the daily user which it didn't.
After updating mapillary_tools in the daily account and checking the version number as advised, I tested it again with my videos.
Sorry, the same older version of Piexif (1.0.13m instead of 1.1.3) was installed and the same errors were thrown when running the command from my former posting.
At least now I am sure that only a local machine issue applies in my case and that the videos are OK in general.
As the video sequences are only covering 8 minutes of footage which can be redone here in my area, it will be easier to create it again - but this time with correct time lapse setting instead of the unwanted video setting.
Thanks for fixing the trouble part of mt for other contributors.
Hey @cmuerau thanks for help debugging. Do you have a chance trying out the latest mapillary_tools v0.8.0
mapillary_tools video_process "$VIDEO_PATH" "$IMAGE_PATH" --geotag_source "gopro_videos" --interpolate_directions --video_sample_interval 1 --overwrite_EXIF_gps_tag
Thanks @ptpt for pointing to the new version.
Update on both platforms. All I got were error messages on both platforms when trying to process images and video content.
On Ubuntu for images (skript ran fine alle the months before update):
mapillary_tool: error: unrecognized arguments: --import_path --number_threads 10 --advanced
On macOS for videos:
mapillary_tool: error: unrecognized arguments: --import_path --video_import_path LOCALVIDEOPATH --user_name macsico --advanced --local_time
Any ideas?
That's caused by some breaking changes introduced in v0.8.0
.
Instead of mapillary_tools --import_path=IMAGE_DIR --video_import_path=VIDEO_DIR
, try
mapillary_tools video_process VIDEO_DIR IMAGE_DIR
Also --number_threads
and --advanced
are not needed, so just remove them.
Thanks for the explanations.
Tried to process GoPro images on the Ubuntu server as before, now with command changed:
/hp/bd/ac/ws/.local/bin/mapillary_tools process_and_upload "/hp/bd/ac/ws/goprotemp/" --user_name macsico --duplicate_distance 0.5 --duplicate_angle 1 --interpolate_directions --overwrite_EXIF_direction_tag
At first it worked again and progress indicators looked fine, then this output was given:
2021-10-13 19:01:39,459 - INFO - {
"total_images": 1571,
"processed_images": 1559,
"failed_images": 10,
"duplicated_images": 2
}
Traceback (most recent call last):
File "/hp/bd/ac/ws/.local/bin/mapillary_tools", line 11, in <module>
load_entry_point('mapillary-tools==0.8.0', 'console_scripts', 'mapillary_tools')()
File "/hp/bd/ac/ws/.local/lib/python3.6/site-packages/mapillary_tools/__main__.py", line 123, in main
args.func(vars(args))
File "/hp/bd/ac/ws/.local/lib/python3.6/site-packages/mapillary_tools/commands/process_and_upload.py", line 14, in run
ProcessCommand().run(args)
File "/hp/bd/ac/ws/.local/lib/python3.6/site-packages/mapillary_tools/commands/process.py", line 255, in run
for k, v in vars_args.items()
File "/hp/bd/ac/ws/.local/lib/python3.6/site-packages/mapillary_tools/insert_MAPJson.py", line 136, in insert_MAPJson
f"Failed to process {summary['failed_images']} images. Check {desc_path} for details. Specify --skip_process_errors to skip these errors"
RuntimeError: Failed to process 10 images. Check /hp/bd/ac/ws/goprotemp/mapillary_image_description.json for details. Specify --skip_process_errors to skip these errors
Was the process abandoned just because of the images found with no GPS?
Check out https://github.com/mapillary/mapillary_tools/releases/tag/v0.10.0
mapillary_tools process_and_upload GOPRO_VIDEO_DIR