diff --git a/mapillary_tools/commands/process.py b/mapillary_tools/commands/process.py index 239b64510..30275fc06 100644 --- a/mapillary_tools/commands/process.py +++ b/mapillary_tools/commands/process.py @@ -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 @@ -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}" @@ -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, **( diff --git a/mapillary_tools/process_geotag_properties.py b/mapillary_tools/process_geotag_properties.py index bba2a33d1..59a4cf345 100644 --- a/mapillary_tools/process_geotag_properties.py +++ b/mapillary_tools/process_geotag_properties.py @@ -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, @@ -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( [