Skip to content
32 changes: 0 additions & 32 deletions mapillary_tools/commands/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
process_finalize,
process_geotag_properties,
)
from ..process_import_meta_properties import process_import_meta_properties
from ..process_sequence_properties import process_sequence_properties


Expand Down Expand Up @@ -107,26 +106,6 @@ def add_basic_arguments(self, parser: argparse.ArgumentParser):
default=None,
required=False,
)
group_metadata.add_argument(
"--orientation",
help="Specify the image orientation in degrees. Note this might result in image rotation. Note this input has precedence over the input read from the import source file.",
choices=[0, 90, 180, 270],
type=int,
default=None,
required=False,
)
group_metadata.add_argument(
"--GPS_accuracy",
help="GPS accuracy in meters. Note this input has precedence over the input read from the import source file.",
default=None,
required=False,
)
group_metadata.add_argument(
"--camera_uuid",
help="Custom string used to differentiate different captures taken with the same camera make and model.",
default=None,
required=False,
)

group_geotagging = parser.add_argument_group(
f"{constants.ANSI_BOLD}PROCESS GEOTAGGING OPTIONS{constants.ANSI_RESET_ALL}"
Expand Down Expand Up @@ -260,17 +239,6 @@ def run(self, vars_args: dict):
),
)

metadatas = process_import_meta_properties(
metadatas=metadatas,
**(
{
k: v
for k, v in vars_args.items()
if k in inspect.getfullargspec(process_import_meta_properties).args
}
),
)

metadatas = process_sequence_properties(
metadatas=metadatas,
**(
Expand Down
14 changes: 14 additions & 0 deletions mapillary_tools/process_geotag_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ def process_finalize(
import_path: T.Union[T.Sequence[Path], Path],
metadatas: T.List[types.MetadataOrError],
skip_process_errors: bool = False,
device_make: T.Optional[str] = None,
device_model: T.Optional[str] = None,
overwrite_all_EXIF_tags: bool = False,
overwrite_EXIF_time_tag: bool = False,
overwrite_EXIF_gps_tag: bool = False,
Expand All @@ -564,6 +566,18 @@ def process_finalize(
desc_path: T.Optional[str] = None,
num_processes: T.Optional[int] = None,
) -> T.List[types.MetadataOrError]:
for metadata in metadatas:
if isinstance(metadata, types.VideoMetadata):
if device_make is not None:
metadata.make = device_make
if device_model is not None:
metadata.model = device_model
elif isinstance(metadata, types.ImageMetadata):
if device_make is not None:
metadata.MAPDeviceMake = device_make
if device_model is not None:
metadata.MAPDeviceModel = device_model

# modified in place
_apply_offsets(
[
Expand Down
Loading