Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mapillary_tools/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
process_and_upload,
sample_video,
upload,
upload_camm,
video_process,
video_process_and_upload,
)
6 changes: 0 additions & 6 deletions mapillary_tools/commands/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
process_and_upload,
sample_video,
upload,
upload_blackvue,
upload_camm,
upload_zip,
video_process,
video_process_and_upload,
zip,
Expand All @@ -23,9 +20,6 @@
mapillary_tools_commands = [
process,
upload,
upload_camm,
upload_blackvue,
upload_zip,
sample_video,
video_process,
authenticate,
Expand Down
18 changes: 0 additions & 18 deletions mapillary_tools/commands/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@ def add_basic_arguments(self, parser: argparse.ArgumentParser):
default=None,
required=False,
)
group_metadata.add_argument(
"--add_file_name",
help="[DEPRECATED since v0.9.4] Add original file name to EXIF.",
action="store_true",
required=False,
)
group_metadata.add_argument(
"--add_import_date",
help="[DEPRECATED since v0.10.0] Add import date.",
action="store_true",
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.",
Expand All @@ -139,12 +127,6 @@ def add_basic_arguments(self, parser: argparse.ArgumentParser):
default=None,
required=False,
)
group_metadata.add_argument(
"--custom_meta_data",
help='[DEPRECATED since v0.10.0] Add custom meta data to all images. Required format of input is a string, consisting of the meta data name, type and value, separated by a comma for each entry, where entries are separated by semicolon. Supported types are long, double, string, boolean, date. Example for two meta data entries "random_name1,double,12.34;random_name2,long,1234".',
default=None,
required=False,
)

group_geotagging = parser.add_argument_group(
f"{constants.ANSI_BOLD}PROCESS GEOTAGGING OPTIONS{constants.ANSI_RESET_ALL}"
Expand Down
27 changes: 1 addition & 26 deletions mapillary_tools/commands/upload.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import inspect
import typing as T

from .. import constants
from ..upload import DirectUploadFileType, FileType, upload
from ..upload import upload


class Command:
Expand Down Expand Up @@ -34,30 +33,6 @@ def add_basic_arguments(self, parser):
group = parser.add_argument_group(
f"{constants.ANSI_BOLD}UPLOAD OPTIONS{constants.ANSI_RESET_ALL}"
)
default_filetypes = ",".join(sorted(t.value for t in FileType))
supported_filetypes = ",".join(
sorted(
[t.value for t in DirectUploadFileType] + [t.value for t in FileType]
)
)

def _type(option: str) -> T.List[T.Union[FileType, DirectUploadFileType]]:
r: T.List[T.Union[FileType, DirectUploadFileType]] = []
for t in option.split(","):
if t in [x.value for x in FileType]:
r.append(FileType(t))
else:
r.append(DirectUploadFileType(t))
return r

group.add_argument(
"--filetypes",
"--file_types",
help=f"Upload files of the specified types only. Supported file types: {supported_filetypes} [default: %(default)s]",
type=_type,
default=default_filetypes,
required=False,
)
group.add_argument(
"--desc_path",
help=f'Path to the description file generated by the process command. The hyphen "-" indicates STDIN. [default: {{IMPORT_PATH}}/{constants.IMAGE_DESCRIPTION_FILENAME}]',
Expand Down
33 changes: 0 additions & 33 deletions mapillary_tools/commands/upload_blackvue.py

This file was deleted.

33 changes: 0 additions & 33 deletions mapillary_tools/commands/upload_camm.py

This file was deleted.

33 changes: 0 additions & 33 deletions mapillary_tools/commands/upload_zip.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def to_description(self) -> T.List[types.ImageMetadataOrError]:
video_paths = utils.find_videos(
[Path(pathstr) for pathstr in rdf_description_by_path.keys()],
skip_subfolders=True,
check_file_suffix=True,
)

# will try to geotag these error metadatas from video later
Expand Down
15 changes: 2 additions & 13 deletions mapillary_tools/process_geotag_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,8 @@ def process_geotag_properties(

metadatas: T.List[types.MetadataOrError] = []

# if more than one filetypes speficied, check filename suffixes,
# i.e. files not ended with .jpg or .mp4 will be ignored
check_file_suffix = len(filetypes) > 1

if FileType.IMAGE in filetypes:
image_paths = utils.find_images(
import_paths,
skip_subfolders=skip_subfolders,
check_file_suffix=check_file_suffix,
)
image_paths = utils.find_images(import_paths, skip_subfolders=skip_subfolders)
if image_paths:
image_metadatas = _process_images(
image_paths,
Expand All @@ -240,9 +232,7 @@ def process_geotag_properties(
or FileType.VIDEO in filetypes
):
video_paths = utils.find_videos(
import_paths,
skip_subfolders=skip_subfolders,
check_file_suffix=check_file_suffix,
import_paths, skip_subfolders=skip_subfolders
)
if video_paths:
video_metadata = _process_videos(
Expand Down Expand Up @@ -289,7 +279,6 @@ def _process_videos_beta(vars_args: T.Dict):
"num_processes": vars_args["num_processes"],
"device_make": vars_args["device_make"],
"device_model": vars_args["device_model"],
"check_file_suffix": len(vars_args["filetypes"]) > 1,
}
extractor = VideoDataExtractor(options)
return extractor.process()
Expand Down
14 changes: 0 additions & 14 deletions mapillary_tools/process_import_meta_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,8 @@ def process_import_meta_properties(
device_make=None,
device_model=None,
GPS_accuracy=None,
add_file_name=False,
add_import_date=False,
custom_meta_data=None,
camera_uuid=None,
) -> T.List[types.MetadataOrError]:
if add_file_name:
LOG.warning("The option --add_file_name is not needed any more since v0.10.0")

if add_import_date:
LOG.warning("The option --add_import_date is not needed any more since v0.10.0")

if custom_meta_data:
LOG.warning(
"The option --custom_meta_data is not needed any more since v0.10.0"
)

for metadata in metadatas:
if isinstance(metadata, types.ErrorMetadata):
continue
Expand Down
1 change: 1 addition & 0 deletions mapillary_tools/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class FileType(enum.Enum):
GOPRO = "gopro"
IMAGE = "image"
VIDEO = "video"
ZIP = "zip"


@dataclasses.dataclass
Expand Down
Loading
Loading