I’m trying to figure out how to use the command line options correctly when uploading sequences captured with a GoPro. I’ve experimented with the Mapillary_tools process command to see what happens. The command used…
mapillary_tools-0.9.3-win-64bit process “E:\GoPro Capture\100722\104GOPRO” --interpolate_directions --duplicate_distance 0.5 --duplicate_angle 20
First, I find no documentation (why?) for this command option in the README.md file. Looking at the comments in the process.py file I see this…
help=‘The maximum distance that can be considered “too close” between two images. If both images also point in the same direction (see --duplicate_angle), the later image will be marked as duplicate and will not be upload. [default: %(default)s]’,
I’m presuming the “distance” is in meters. No? Why isn’t this documented?
First question… it says the “image will be marked as duplicate”. Where will it be marked? In the mapillary_image_description.json file? Can I find this marking so that I can tell this command option worked? I’ve tried this on a capture sequence that I know has multiple images captured while I was not moving. I can’t see anything that changed after processing to indicate that any images were marked as duplicates.
Second question… What’s the use case for the –duplicate_angle option? I don’t believe GoPros provide compass info. Reading the comments in the process.py…
help=“The maximum camera angle difference between two images to be considered as heading in the same direction. If both images are also close to each other (see --duplicate_distance), the later image will be marked as duplicate and will not be upload. [default: %(default)s]”,
So… If I read this correctly, if the perceived angle between two images is equal to or less than the angle set by the --duplicate_angle options, the two images will be considered heading in the same direction. If the images are heading in the same direction AND the distance between the two images is below (or equal to) the threshold set by the --duplicate_distance option, then “the later image will be marked as duplicate and will not be upload(ed)”.
My understanding is that GPS compass headings can vary widely while standing still.
I’ve got a sequence where I was not moving for the first six images. The “MAPCompassHeading” - in the json file after processing - varied by up to ~15 degrees for these images. Max distance between the image coordinates was ~0.2 m. So if I’ve understood this correctly, then the -duplicate_distance 0.5 and -duplicate_angle 20 command options should have resulted in the later images being marked as duplicates somewhere. No? If they were marked, where can I see this?
Next question… I find in the constants.py file…
DUPLICATE_DISTANCE = float(os.getenv(_ENV_PREFIX + “DUPLICATE_DISTANCE”, 0.1))
DUPLICATE_ANGLE = float(os.getenv(_ENV_PREFIX + “DUPLICATE_ANGLE”, 5))
So if the –duplicate_distance and –duplicate_angle options are not used in your command, do “duplicate images” still get identified (based on the defaults) and prevented from being uploaded?
How about the Mapillary Uploader application? Does it mark images as duplicates based on the defaults?
For reference… here is the info for the first six images in the json file produced by the process command…
{
“MAPLatitude”: 39.5872201,
“MAPLongitude”: -76.86480359999999,
“MAPCaptureTime”: “2022_10_07_13_13_13_000”,
“filename”: “E:\GoPro Capture\100722\104GOPRO\G0017329.JPG”,
“MAPAltitude”: 240.253,
“MAPOrientation”: 1,
“MAPDeviceMake”: “GoPro”,
“MAPDeviceModel”: “HERO5 Black”,
“MAPMetaTags”: {
“strings”: [
{
“key”: “mapillary_tools_version”,
“value”: “0.9.3”
}
]
},
“MAPCompassHeading”: {
“TrueHeading”: 170.62278154453497,
“MagneticHeading”: 170.62278154453497
},
“MAPSequenceUUID”: “82885958-2c89-42b6-a686-42c60964325a”
},
{
“MAPLatitude”: 39.5872187,
“MAPLongitude”: -76.86480329999999,
“MAPCaptureTime”: “2022_10_07_13_13_13_000”,
“filename”: “E:\GoPro Capture\100722\104GOPRO\G0017330.JPG”,
“MAPAltitude”: 239.972,
“MAPOrientation”: 1,
“MAPDeviceMake”: “GoPro”,
“MAPDeviceModel”: “HERO5 Black”,
“MAPMetaTags”: {
“strings”: [
{
“key”: “mapillary_tools_version”,
“value”: “0.9.3”
}
]
},
“MAPCompassHeading”: {
“TrueHeading”: 156.0295583552704,
“MagneticHeading”: 156.0295583552704
},
“MAPSequenceUUID”: “82885958-2c89-42b6-a686-42c60964325a”
},
{
“MAPLatitude”: 39.58721349997222,
“MAPLongitude”: -76.86480029997222,
“MAPCaptureTime”: “2022_10_07_13_13_14_000”,
“filename”: “E:\GoPro Capture\100722\104GOPRO\G0017331.JPG”,
“MAPAltitude”: 238.647,
“MAPOrientation”: 1,
“MAPDeviceMake”: “GoPro”,
“MAPDeviceModel”: “HERO5 Black”,
“MAPMetaTags”: {
“strings”: [
{
“key”: “mapillary_tools_version”,
“value”: “0.9.3”
}
]
},
“MAPCompassHeading”: {
“TrueHeading”: 163.2784159355898,
“MagneticHeading”: 163.2784159355898
},
“MAPSequenceUUID”: “82885958-2c89-42b6-a686-42c60964325a”
},
{
“MAPLatitude”: 39.587207599972224,
“MAPLongitude”: -76.86479799997221,
“MAPCaptureTime”: “2022_10_07_13_13_15_000”,
“filename”: “E:\GoPro Capture\100722\104GOPRO\G0017332.JPG”,
“MAPAltitude”: 237.476,
“MAPOrientation”: 1,
“MAPDeviceMake”: “GoPro”,
“MAPDeviceModel”: “HERO5 Black”,
“MAPMetaTags”: {
“strings”: [
{
“key”: “mapillary_tools_version”,
“value”: “0.9.3”
}
]
},
“MAPCompassHeading”: {
“TrueHeading”: 155.79381295178064,
“MagneticHeading”: 155.79381295178064
},
“MAPSequenceUUID”: “82885958-2c89-42b6-a686-42c60964325a”
},
{
“MAPLatitude”: 39.5872016,
“MAPLongitude”: -76.86479449999999,
“MAPCaptureTime”: “2022_10_07_13_13_15_000”,
“filename”: “E:\GoPro Capture\100722\104GOPRO\G0017333.JPG”,
“MAPAltitude”: 236.332,
“MAPOrientation”: 1,
“MAPDeviceMake”: “GoPro”,
“MAPDeviceModel”: “HERO5 Black”,
“MAPMetaTags”: {
“strings”: [
{
“key”: “mapillary_tools_version”,
“value”: “0.9.3”
}
]
},
“MAPCompassHeading”: {
“TrueHeading”: 155.4543505595425,
“MagneticHeading”: 155.4543505595425
},
“MAPSequenceUUID”: “82885958-2c89-42b6-a686-42c60964325a”
},
{
“MAPLatitude”: 39.5871962,
“MAPLongitude”: -76.86479129997221,
“MAPCaptureTime”: “2022_10_07_13_13_16_000”,
“filename”: “E:\GoPro Capture\100722\104GOPRO\G0017334.JPG”,
“MAPAltitude”: 235.068,
“MAPOrientation”: 1,
“MAPDeviceMake”: “GoPro”,
“MAPDeviceModel”: “HERO5 Black”,
“MAPMetaTags”: {
“strings”: [
{
“key”: “mapillary_tools_version”,
“value”: “0.9.3”
}
]
},
“MAPCompassHeading”: {
“TrueHeading”: 176.32543633256842,
“MagneticHeading”: 176.32543633256842
},
“MAPSequenceUUID”: “82885958-2c89-42b6-a686-42c60964325a”
},