docstr: Export the model to ONNX format.
  
  Args:
      dirname(str): The directory to save the onnx model.
      input_shape_dict: dictionary ``{ input_name: input_value }, eg. {'x': [-1, 3, -1, -1]}``
      opset_version(int): operator set
docstr_tok: ["Export","the","model","to","ONNX","format",".","Args",":","dirname","(","str",")",":","The","directory","to","save","the","onnx","model",".","input_shape_dict",":","dictionary","``","{","input_name",":","input_value","}",",","eg",".","{","'","x","'",":","[","-1",",","3",",","-1",",","-1","]","}","``","opset_version","(","int",")",":","operator","set"]
code: def export_onnx_model(
      self, dirname: str, input_shape_dict=None, opset_version=10
  ):
      """
      Export the model to ONNX format.
  
      Args:
          dirname(str): The directory to save the onnx model.
          input_shape_dict: dictionary ``{ input_name: input_value }, eg. {'x': [-1, 3, -1, -1]}``
          opset_version(int): operator set
      """
      v0, v1, v2 = paddle2onnx.__version__.split(".")
      if int(v0) == 0 and int(v1) < 9:
          raise ImportError("paddle2onnx>=0.9.0 is required")
  
      if input_shape_dict is not None and not isinstance(
          input_shape_dict, dict
      ):
          raise Exception(
              "input_shape_dict should be dict, eg. {'x': [-1, 3, -1, -1]}."
          )
  
      if opset_version <= 9:
          raise Exception(
              "opset_version <= 9 is not surpported, please try with higher opset_version >=10."
          )
  
      path_dict = {
          "det": self.det_model_dir,
          "rec": self.rec_model_dir,
          "cls": self.cls_model_dir,
      }
      for key, path in path_dict.items():
          save_file = os.path.join(
              dirname, "{}_{}.onnx".format(self.name, key)
          )
  
          exe = paddle.static.Executor(paddle.CPUPlace())
          [
              program,
              feed_var_names,
              fetch_vars,
          ] = paddle.static.load_inference_model(
              os.path.join(path, "inference"), exe
          )
  
          onnx_proto = p2o.run_convert(
              program,
              input_shape_dict=input_shape_dict,
              opset_version=opset_version,
          )
          mkdir(save_file)
          with open(save_file, "wb") as f:
              f.write(onnx_proto.SerializeToString())
  
file_path: PaddleHub/modules/image/text_recognition/multi_languages_ocr_db_crnn/module.py
imports: import argparse
  import os
  import ast
  import paddle
  import paddle.static
  import paddle2onnx
  import paddle2onnx
  from paddleocr import PaddleOCR
  from paddleocr.ppocr.utils.logging import get_logger
  from paddleocr.tools.infer.utility import base64_to_cv2
  from paddlehub.module.module import moduleinfo, runnable, serving
  from .utils import read_images, save_result_image, mkdir
label_desc: Use image node_id 6 for calling the MultiLangOCR obj's underlying member method code with example usage: obj.export_onnx_model(dirname, input_shape_dict, opset_version) without return types