if len(s.file_list) == 0:
        print("No images in the folder or all images have all ready been uploaded to Mapillary")
        print(
            'Note: If upload fails mid-sequence due to connection failure or similar, you should manually push the images to the server at http://www.mapillary.com/map/upload/im/ and pressing "push to Mapillary".'
        )
        sys.exit()

    print("Uploading sequence {0}.".format(sequence_id))
    # check mapillary tag and required exif
    file_list = []
    for filepath in s.file_list:
        mapillary_tag_exists = EXIF(filepath).mapillary_tag_exists()
        if mapillary_tag_exists:
            print("File {} contains Mapillary EXIF tags, use upload.py instead.".format(filepath))

        required_exif_exist = verify_exif(filepath)
        if not required_exif_exist:
            print("File {} missing required exif".format(filepath))

        if required_exif_exist and (not mapillary_tag_exists):
            file_list.append(filepath)

    # upload valid files
    upload_file_list(file_list, params)

    # ask user if finalize upload to check that everything went fine
    print(
        "===\nFinalizing upload will submit all successful uploads and ignore all failed.\nIf all files were marked as successful, everything is fine, just press 'y'."
    )
    finalize_upload(params)
    # Caution: all nested folders will be merged into one sequence!
    s = Sequence(path, skip_folders=['success', 'duplicates'], skip_subfolders=skip_subfolders)

    if len(s.file_list) == 0:
        print('No images in the folder or all images have all ready been uploaded to Mapillary')
        print('Note: If upload fails mid-sequence due to connection failure or similar, you should manually push the images to the server at http://www.mapillary.com/map/upload/im/ and pressing "push to Mapillary".')
        sys.exit()

    print("Uploading sequence {0}.".format(sequence_id))

    # check mapillary tag and required exif
    file_list = []
    for filepath in s.file_list:
        mapillary_tag_exists = EXIF(filepath).mapillary_tag_exists()
        if mapillary_tag_exists:
            print("File {} contains Mapillary EXIF tags, use upload.py instead.".format(filepath))

        required_exif_exist = verify_exif(filepath)
        if not required_exif_exist:
            print("File {} missing required exif".format(filepath))

        if required_exif_exist and (not mapillary_tag_exists):
            file_list.append(filepath)

    #upload valid files
    upload_file_list(file_list, params)

    # ask user if finalize upload to check that everything went fine
    print("===\nFinalizing upload will submit all successful uploads and ignore all failed.\nIf all files were marked as successful, everything is fine, just press 'y'.")
    finalize_upload(params)
    if len(s.file_list) == 0:
        print('No images in the folder or all images have all ready been uploaded to Mapillary')
        print('Note: If upload fails mid-sequence due to connection failure or similar, you should manually push the images to the server at http://www.mapillary.com/map/upload/im/ and pressing "push to Mapillary".')
        sys.exit()

    print("Uploading sequence {0}.".format(sequence_id))

    # check mapillary tag and required exif
    num_image_file = len(s.file_list)
    file_list = []
    for filepath in s.file_list:
        mapillary_tag_exists = EXIF(filepath).mapillary_tag_exists()
        if mapillary_tag_exists:
            print("File {} contains Mapillary EXIF tags, use upload.py instead.".format(filepath))

        required_exif_exist = verify_exif(filepath)
        if not required_exif_exist:
            print("File {} missing required exif".format(filepath))

        if required_exif_exist and (not mapillary_tag_exists):
            file_list.append(filepath)

    #upload valid files
    print ("Uploading {} images with valid exif tags (Skipping {}) ...".format(len(file_list), num_image_file-len(file_list)))
    upload_file_list(file_list, params)

    # ask user if finalize upload to check that everything went fine
    print("===\nFinalizing upload will submit all successful uploads and ignore all failed.\nIf all files were marked as successful, everything is fine, just press 'y'.")
    finalize_upload(params, auto_done=auto_done)
    print("Uploading sequence {0}.".format(sequence_id))

    # check mapillary tag and required exif
    num_image_file = len(s.file_list)
    file_list = []
    for filepath in s.file_list:
        mapillary_tag_exists = EXIF(filepath).mapillary_tag_exists()
        if mapillary_tag_exists:
            print(
                "File {} contains Mapillary EXIF tags, use upload.py instead.".
                format(filepath))

        required_exif_exist = verify_exif(filepath)
        if not required_exif_exist:
            print("File {} missing required exif".format(filepath))

        if required_exif_exist and (not mapillary_tag_exists):
            file_list.append(filepath)

    #upload valid files
    print("Uploading {} images with valid exif tags (Skipping {}) ...".format(
        len(file_list), num_image_file - len(file_list)))
    upload_file_list(file_list, params)

    # ask user if finalize upload to check that everything went fine
    print(
        "===\nFinalizing upload will submit all successful uploads and ignore all failed.\nIf all files were marked as successful, everything is fine, just press 'y'."
    )
    finalize_upload(params, auto_done=auto_done)