code: def __add_segmentation_args(parser):
      """
      keywords defined for segmentation tasks
  
      :param parser:
      :return:
      """
      parser.add_argument(
          "--num_classes",
          metavar="",
          help="Set number of classes",
          type=int,
          default=-1,
      )
  
      parser.add_argument(
          "--output_prob",
          metavar="",
          help="[Inference only] whether to output multi-class probabilities",
          type=str2boolean,
          default=False,
      )
  
      parser.add_argument(
          "--label_normalisation",
          metavar="",
          help="whether to map unique labels in the training set to "
          "consecutive integers (the smallest label will be  mapped to 0)",
          type=str2boolean,
          default=False,
      )
  
      parser.add_argument(
          "--softmax",
          metavar="",
          help="[Training only] whether to append a softmax layer to network "
          "output before feeding it into loss function",
          type=str2boolean,
          default=True,
      )
  
      # for selective sampling only
      parser.add_argument(
          "--min_sampling_ratio",
          help="[Training only] Minimum ratio of samples in a window for "
          "selective sampler",
          metavar="",
          type=float,
          default=0,
      )
  
      # for selective sampling only
      parser.add_argument(
          "--compulsory_labels",
          help="[Training only] List of labels to have in the window for "
          "selective sampling",
          metavar="",
          type=int_array,
          default=(0, 1),
      )
  
      # for selective sampling only
      parser.add_argument(
          "--rand_samples",
          help="[Training only] Number of completely random samples per image "
          "when using selective sampler",
          metavar="",
          type=int,
          default=0,
      )
  
      # for selective sampling only
      parser.add_argument(
          "--min_numb_labels",
          help="[Training only] Number of labels to have in the window for "
          "selective sampler",
          metavar="",
          type=int,
          default=1,
      )
  
      # for selective sampling only
      parser.add_argument(
          "--proba_connect",
          help="[Training only] Number of labels to have in the window for "
          "selective sampler",
          metavar="",
          type=str2boolean,
          default=True,
      )
  
      parser.add_argument(
          "--evaluation_units",
          help="Compute per-component metrics for per label or per connected "
          "component. [foreground, label, or cc]",
          choices=["foreground", "label", "cc"],
          default="foreground",
      )
  
      #  for mixup augmentation
      parser.add_argument(
          "--do_mixup",
          help="Use the 'mixup' option.",
          type=str2boolean,
          default=False,
      )
  
      #  for mixup augmentation
      parser.add_argument(
          "--mixup_alpha",
          help="The alpha value to parametrise the beta distribution "
          "(alpha, alpha). Default: 0.2.",
          type=float,
          default=0.2,
      )
  
      #  for mixup augmentation
      parser.add_argument(
          "--mix_match",
          help="If true, matches bigger segmentations with "
          "smaller segmentations.",
          type=str2boolean,
          default=False,
      )
  
      from niftynet.application.segmentation_application import (
          SUPPORTED_INPUT,
      )
  
      parser = add_input_name_args(parser, SUPPORTED_INPUT)
      return parser
  
file_path: NiftyNet/niftynet/utilities/user_parameters_custom.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from niftynet.utilities.user_parameters_helper import add_input_name_args, int_array, str2boolean
label_desc: Use image node_id 3 for calling a global function with example usage: __add_segmentation_args(parser) and returns: parser