docstr: Run as a command.
docstr_tok: ["Run","as","a","command","."]
code: def run_cmd(self, argvs):
      """
      Run as a command.
      """
      self.parser = argparse.ArgumentParser(
          description="Run the {} module.".format(self.name),
          prog="hub run {}".format(self.name),
          usage="%(prog)s",
          add_help=True,
      )
      self.arg_input_group = self.parser.add_argument_group(
          title="Input options", description="Input data. Required"
      )
      self.arg_config_group = self.parser.add_argument_group(
          title="Config options",
          description="Run configuration for controlling module behavior, not required.",
      )
      self.add_module_config_arg()
      self.add_module_input_arg()
      args = self.parser.parse_args(argvs)
      results = self.segment(
          paths=[args.input_path],
          batch_size=args.batch_size,
          use_gpu=args.use_gpu,
          output_dir=args.output_dir,
          visualization=args.visualization,
      )
      if args.save_dir is not None:
          check_dir(args.save_dir)
          self.save_inference_model(args.save_dir)
  
      return results
  
imports: import argparse
  import ast
  import os
  import os.path
  import cv2
  import numpy
  import paddle.jit
  import paddle.static
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from .data_feed import preprocess_v
  from .data_feed import reader
  from .optimal import postprocess_v
  from .optimal import threshold_mask
  from .processor import base64_to_cv2
  from .processor import check_dir
  from .processor import cv2_to_base64
  from .processor import postprocess
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
label_desc: Use image node_id 7 for calling the HRNetw18samllv1humanseg obj's underlying member method code with example usage: obj.run_cmd(argvs) and returns: results