ignore generated script bash, add param for username subfolder in data
This commit is contained in:
parent
b43cacea56
commit
ac78ace1b7
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@ __pycache__/
|
||||
build/
|
||||
dist/
|
||||
*.spec
|
||||
secrets_variables.sh
|
||||
secrets_variables.sh
|
||||
script_bash_get*
|
||||
|
@ -22,7 +22,7 @@ session.mount("https://", HTTPAdapter(max_retries=retries_strategies))
|
||||
|
||||
def parse_args(argv=None):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("access_token", type=str, help="Your mapillary access token")
|
||||
parser.add_argument("--access_token", type=str, help="Your mapillary access token")
|
||||
parser.add_argument(
|
||||
"--sequence_ids",
|
||||
type=str,
|
||||
@ -47,6 +47,12 @@ def parse_args(argv=None):
|
||||
default=None,
|
||||
help="How many images you want to download",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--username",
|
||||
type=str,
|
||||
default=None,
|
||||
help="The username to separate sequences for each user",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--overwrite",
|
||||
default=False,
|
||||
@ -231,7 +237,7 @@ if __name__ == "__main__":
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as executor:
|
||||
for i, image_data in enumerate(images_data):
|
||||
# create a folder for each unique sequence ID to group images by sequence
|
||||
path_destination = os.path.join(args.destination, image_data["sequence_id"])
|
||||
path_destination = os.path.join(args.destination, args.username, image_data["sequence_id"])
|
||||
if not os.path.exists(path_destination):
|
||||
os.makedirs(path_destination)
|
||||
date_time_image_filename = (
|
||||
|
Loading…
Reference in New Issue
Block a user