# AUTOMATICALLY GENERATED by `shtab`

_shtab_tyro_ns_process_data_subparsers=('images' 'video' 'polycam' 'metashape' 'realitycapture' 'record3d' 'odm' 'aria')

_shtab_tyro_ns_process_data_option_strings=('-h' '--help')
_shtab_tyro_ns_process_data_images_option_strings=('-h' '--help' '--data' '--output-dir' '--eval-data' '--verbose' '--no-verbose' '--camera-type' '--matching-method' '--sfm-tool' '--refine-pixsfm' '--no-refine-pixsfm' '--refine-intrinsics' '--no-refine-intrinsics' '--feature-type' '--matcher-type' '--num-downscales' '--skip-colmap' '--no-skip-colmap' '--skip-image-processing' '--no-skip-image-processing' '--colmap-model-path' '--colmap-cmd' '--images-per-equirect' '--crop-factor' '--crop-bottom' '--gpu' '--no-gpu' '--use-sfm-depth' '--no-use-sfm-depth' '--include-depth-debug' '--no-include-depth-debug' '--same-dimensions' '--no-same-dimensions' '--use-single-camera-mode' '--no-use-single-camera-mode' '--percent-radius-crop')
_shtab_tyro_ns_process_data_video_option_strings=('-h' '--help' '--data' '--output-dir' '--eval-data' '--verbose' '--no-verbose' '--camera-type' '--matching-method' '--sfm-tool' '--refine-pixsfm' '--no-refine-pixsfm' '--refine-intrinsics' '--no-refine-intrinsics' '--feature-type' '--matcher-type' '--num-downscales' '--skip-colmap' '--no-skip-colmap' '--skip-image-processing' '--no-skip-image-processing' '--colmap-model-path' '--colmap-cmd' '--images-per-equirect' '--crop-factor' '--crop-bottom' '--gpu' '--no-gpu' '--use-sfm-depth' '--no-use-sfm-depth' '--include-depth-debug' '--no-include-depth-debug' '--same-dimensions' '--no-same-dimensions' '--use-single-camera-mode' '--no-use-single-camera-mode' '--num-frames-target' '--percent-radius-crop' '--random-seed' '--eval-random-seed')
_shtab_tyro_ns_process_data_polycam_option_strings=('-h' '--help' '--data' '--output-dir' '--eval-data' '--verbose' '--no-verbose' '--num-downscales' '--use-uncorrected-images' '--no-use-uncorrected-images' '--max-dataset-size' '--min-blur-score' '--crop-border-pixels' '--use-depth' '--no-use-depth')
_shtab_tyro_ns_process_data_metashape_option_strings=('-h' '--help' '--xml' '--data' '--output-dir' '--eval-data' '--verbose' '--no-verbose' '--ply' '--num-downscales' '--max-dataset-size')
_shtab_tyro_ns_process_data_realitycapture_option_strings=('-h' '--help' '--csv' '--data' '--output-dir' '--eval-data' '--verbose' '--no-verbose' '--ply' '--num-downscales' '--max-dataset-size')
_shtab_tyro_ns_process_data_record3d_option_strings=('-h' '--help' '--data' '--output-dir' '--eval-data' '--verbose' '--no-verbose' '--ply-dir' '--voxel-size' '--num-downscales' '--max-dataset-size')
_shtab_tyro_ns_process_data_odm_option_strings=('-h' '--help' '--data' '--output-dir' '--eval-data' '--verbose' '--no-verbose' '--num-downscales' '--max-dataset-size')
_shtab_tyro_ns_process_data_aria_option_strings=('-h' '--help' '--vrs-file' '--mps-data-dir' '--output-dir' '--max-frames' '--max-output-size')

_shtab_tyro_ns_process_data_images___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_images___output_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_images___eval_data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_images___colmap_model_path_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_video___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_video___output_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_video___eval_data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_video___colmap_model_path_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_polycam___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_polycam___output_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_polycam___eval_data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_metashape___xml_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_metashape___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_metashape___output_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_metashape___eval_data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_metashape___ply_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_realitycapture___csv_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_realitycapture___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_realitycapture___output_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_realitycapture___eval_data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_realitycapture___ply_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_record3d___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_record3d___output_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_record3d___eval_data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_record3d___ply_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_odm___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_odm___output_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_odm___eval_data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_aria___vrs_file_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_process_data_aria___mps_data_dir_COMPGEN=_shtab_compgen_dirs
_shtab_tyro_ns_process_data_aria___output_dir_COMPGEN=_shtab_compgen_dirs

_shtab_tyro_ns_process_data_pos_0_choices=('images' 'video' 'polycam' 'metashape' 'realitycapture' 'record3d' 'odm' 'aria')
_shtab_tyro_ns_process_data_images___camera_type_choices=('perspective' 'fisheye' 'equirectangular' 'pinhole' 'simple_pinhole')
_shtab_tyro_ns_process_data_images___matching_method_choices=('exhaustive' 'sequential' 'vocab_tree')
_shtab_tyro_ns_process_data_images___sfm_tool_choices=('any' 'colmap' 'hloc')
_shtab_tyro_ns_process_data_images___feature_type_choices=('any' 'sift' 'superpoint' 'superpoint_aachen' 'superpoint_max' 'superpoint_inloc' 'r2d2' 'd2net-ss' 'sosnet' 'disk')
_shtab_tyro_ns_process_data_images___matcher_type_choices=('any' 'NN' 'superglue' 'superglue-fast' 'NN-superpoint' 'NN-ratio' 'NN-mutual' 'adalam' 'disk+lightglue' 'superpoint+lightglue')
_shtab_tyro_ns_process_data_images___images_per_equirect_choices=('8' '14')
_shtab_tyro_ns_process_data_video___camera_type_choices=('perspective' 'fisheye' 'equirectangular' 'pinhole' 'simple_pinhole')
_shtab_tyro_ns_process_data_video___matching_method_choices=('exhaustive' 'sequential' 'vocab_tree')
_shtab_tyro_ns_process_data_video___sfm_tool_choices=('any' 'colmap' 'hloc')
_shtab_tyro_ns_process_data_video___feature_type_choices=('any' 'sift' 'superpoint' 'superpoint_aachen' 'superpoint_max' 'superpoint_inloc' 'r2d2' 'd2net-ss' 'sosnet' 'disk')
_shtab_tyro_ns_process_data_video___matcher_type_choices=('any' 'NN' 'superglue' 'superglue-fast' 'NN-superpoint' 'NN-ratio' 'NN-mutual' 'adalam' 'disk+lightglue' 'superpoint+lightglue')
_shtab_tyro_ns_process_data_video___images_per_equirect_choices=('8' '14')

_shtab_tyro_ns_process_data_pos_0_nargs=A...
_shtab_tyro_ns_process_data__h_nargs=0
_shtab_tyro_ns_process_data___help_nargs=0
_shtab_tyro_ns_process_data_images__h_nargs=0
_shtab_tyro_ns_process_data_images___help_nargs=0
_shtab_tyro_ns_process_data_images___verbose_nargs=0
_shtab_tyro_ns_process_data_images___no_verbose_nargs=0
_shtab_tyro_ns_process_data_images___refine_pixsfm_nargs=0
_shtab_tyro_ns_process_data_images___no_refine_pixsfm_nargs=0
_shtab_tyro_ns_process_data_images___refine_intrinsics_nargs=0
_shtab_tyro_ns_process_data_images___no_refine_intrinsics_nargs=0
_shtab_tyro_ns_process_data_images___skip_colmap_nargs=0
_shtab_tyro_ns_process_data_images___no_skip_colmap_nargs=0
_shtab_tyro_ns_process_data_images___skip_image_processing_nargs=0
_shtab_tyro_ns_process_data_images___no_skip_image_processing_nargs=0
_shtab_tyro_ns_process_data_images___crop_factor_nargs=4
_shtab_tyro_ns_process_data_images___gpu_nargs=0
_shtab_tyro_ns_process_data_images___no_gpu_nargs=0
_shtab_tyro_ns_process_data_images___use_sfm_depth_nargs=0
_shtab_tyro_ns_process_data_images___no_use_sfm_depth_nargs=0
_shtab_tyro_ns_process_data_images___include_depth_debug_nargs=0
_shtab_tyro_ns_process_data_images___no_include_depth_debug_nargs=0
_shtab_tyro_ns_process_data_images___same_dimensions_nargs=0
_shtab_tyro_ns_process_data_images___no_same_dimensions_nargs=0
_shtab_tyro_ns_process_data_images___use_single_camera_mode_nargs=0
_shtab_tyro_ns_process_data_images___no_use_single_camera_mode_nargs=0
_shtab_tyro_ns_process_data_video__h_nargs=0
_shtab_tyro_ns_process_data_video___help_nargs=0
_shtab_tyro_ns_process_data_video___verbose_nargs=0
_shtab_tyro_ns_process_data_video___no_verbose_nargs=0
_shtab_tyro_ns_process_data_video___refine_pixsfm_nargs=0
_shtab_tyro_ns_process_data_video___no_refine_pixsfm_nargs=0
_shtab_tyro_ns_process_data_video___refine_intrinsics_nargs=0
_shtab_tyro_ns_process_data_video___no_refine_intrinsics_nargs=0
_shtab_tyro_ns_process_data_video___skip_colmap_nargs=0
_shtab_tyro_ns_process_data_video___no_skip_colmap_nargs=0
_shtab_tyro_ns_process_data_video___skip_image_processing_nargs=0
_shtab_tyro_ns_process_data_video___no_skip_image_processing_nargs=0
_shtab_tyro_ns_process_data_video___crop_factor_nargs=4
_shtab_tyro_ns_process_data_video___gpu_nargs=0
_shtab_tyro_ns_process_data_video___no_gpu_nargs=0
_shtab_tyro_ns_process_data_video___use_sfm_depth_nargs=0
_shtab_tyro_ns_process_data_video___no_use_sfm_depth_nargs=0
_shtab_tyro_ns_process_data_video___include_depth_debug_nargs=0
_shtab_tyro_ns_process_data_video___no_include_depth_debug_nargs=0
_shtab_tyro_ns_process_data_video___same_dimensions_nargs=0
_shtab_tyro_ns_process_data_video___no_same_dimensions_nargs=0
_shtab_tyro_ns_process_data_video___use_single_camera_mode_nargs=0
_shtab_tyro_ns_process_data_video___no_use_single_camera_mode_nargs=0
_shtab_tyro_ns_process_data_polycam__h_nargs=0
_shtab_tyro_ns_process_data_polycam___help_nargs=0
_shtab_tyro_ns_process_data_polycam___verbose_nargs=0
_shtab_tyro_ns_process_data_polycam___no_verbose_nargs=0
_shtab_tyro_ns_process_data_polycam___use_uncorrected_images_nargs=0
_shtab_tyro_ns_process_data_polycam___no_use_uncorrected_images_nargs=0
_shtab_tyro_ns_process_data_polycam___use_depth_nargs=0
_shtab_tyro_ns_process_data_polycam___no_use_depth_nargs=0
_shtab_tyro_ns_process_data_metashape__h_nargs=0
_shtab_tyro_ns_process_data_metashape___help_nargs=0
_shtab_tyro_ns_process_data_metashape___verbose_nargs=0
_shtab_tyro_ns_process_data_metashape___no_verbose_nargs=0
_shtab_tyro_ns_process_data_realitycapture__h_nargs=0
_shtab_tyro_ns_process_data_realitycapture___help_nargs=0
_shtab_tyro_ns_process_data_realitycapture___verbose_nargs=0
_shtab_tyro_ns_process_data_realitycapture___no_verbose_nargs=0
_shtab_tyro_ns_process_data_record3d__h_nargs=0
_shtab_tyro_ns_process_data_record3d___help_nargs=0
_shtab_tyro_ns_process_data_record3d___verbose_nargs=0
_shtab_tyro_ns_process_data_record3d___no_verbose_nargs=0
_shtab_tyro_ns_process_data_odm__h_nargs=0
_shtab_tyro_ns_process_data_odm___help_nargs=0
_shtab_tyro_ns_process_data_odm___verbose_nargs=0
_shtab_tyro_ns_process_data_odm___no_verbose_nargs=0
_shtab_tyro_ns_process_data_aria__h_nargs=0
_shtab_tyro_ns_process_data_aria___help_nargs=0


# $1=COMP_WORDS[1]
_shtab_compgen_files() {
  compgen -f -- $1  # files
}

# $1=COMP_WORDS[1]
_shtab_compgen_dirs() {
  compgen -d -- $1  # recurse into subdirs
}

# $1=COMP_WORDS[1]
_shtab_replace_nonword() {
  echo "${1//[^[:word:]]/_}"
}

# set default values (called for the initial parser & any subparsers)
_set_parser_defaults() {
  local subparsers_var="${prefix}_subparsers[@]"
  sub_parsers=${!subparsers_var-}

  local current_option_strings_var="${prefix}_option_strings[@]"
  current_option_strings=${!current_option_strings_var}

  completed_positional_actions=0

  _set_new_action "pos_${completed_positional_actions}" true
}

# $1=action identifier
# $2=positional action (bool)
# set all identifiers for an action's parameters
_set_new_action() {
  current_action="${prefix}_$(_shtab_replace_nonword $1)"

  local current_action_compgen_var=${current_action}_COMPGEN
  current_action_compgen="${!current_action_compgen_var-}"

  local current_action_choices_var="${current_action}_choices[@]"
  current_action_choices="${!current_action_choices_var-}"

  local current_action_nargs_var="${current_action}_nargs"
  if [ -n "${!current_action_nargs_var-}" ]; then
    current_action_nargs="${!current_action_nargs_var}"
  else
    current_action_nargs=1
  fi

  current_action_args_start_index=$(( $word_index + 1 - $pos_only ))

  current_action_is_positional=$2
}

# Notes:
# `COMPREPLY`: what will be rendered after completion is triggered
# `completing_word`: currently typed word to generate completions for
# `${!var}`: evaluates the content of `var` and expand its content as a variable
#     hello="world"
#     x="hello"
#     ${!x} -> ${hello} -> "world"
_shtab_tyro_ns_process_data() {
  local completing_word="${COMP_WORDS[COMP_CWORD]}"
  local completed_positional_actions
  local current_action
  local current_action_args_start_index
  local current_action_choices
  local current_action_compgen
  local current_action_is_positional
  local current_action_nargs
  local current_option_strings
  local sub_parsers
  COMPREPLY=()

  local prefix=_shtab_tyro_ns_process_data
  local word_index=0
  local pos_only=0 # "--" delimeter not encountered yet
  _set_parser_defaults
  word_index=1

  # determine what arguments are appropriate for the current state
  # of the arg parser
  while [ $word_index -ne $COMP_CWORD ]; do
    local this_word="${COMP_WORDS[$word_index]}"

    if [[ $pos_only = 1 || " $this_word " != " -- " ]]; then
      if [[ -n $sub_parsers && " ${sub_parsers[@]} " == *" ${this_word} "* ]]; then
        # valid subcommand: add it to the prefix & reset the current action
        prefix="${prefix}_$(_shtab_replace_nonword $this_word)"
        _set_parser_defaults
      fi

      if [[ " ${current_option_strings[@]} " == *" ${this_word} "* ]]; then
        # a new action should be acquired (due to recognised option string or
        # no more input expected from current action);
        # the next positional action can fill in here
        _set_new_action $this_word false
      fi

      if [[ "$current_action_nargs" != "*" ]] && \
         [[ "$current_action_nargs" != "+" ]] && \
         [[ "$current_action_nargs" != *"..." ]] && \
         (( $word_index + 1 - $current_action_args_start_index - $pos_only >= \
            $current_action_nargs )); then
        $current_action_is_positional && let "completed_positional_actions += 1"
        _set_new_action "pos_${completed_positional_actions}" true
      fi
    else
      pos_only=1 # "--" delimeter encountered
    fi

    let "word_index+=1"
  done

  # Generate the completions

  if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then
    # optional argument started: use option strings
    COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
  else
    # use choices & compgen
    local IFS=$'\n' # items may contain spaces, so delimit using newline
    COMPREPLY=( $([ -n "${current_action_compgen}" ] \
                  && "${current_action_compgen}" "${completing_word}") )
    unset IFS
    COMPREPLY+=( $(compgen -W "${current_action_choices[*]}" -- "${completing_word}") )
  fi

  return 0
}

complete -o filenames -F _shtab_tyro_ns_process_data ns-process-data
