docstr: Args:
      export_dir: directory for resulting visualization to be exported
      text_size: size of the category name over box
      rect_th: rectangle thickness
      hide_labels: hide labels
      hide_conf: hide confidence
      file_name: saving name
  Returns:
docstr_tok: ["Args",":","export_dir",":","directory","for","resulting","visualization","to","be","exported","text_size",":","size","of","the","category","name","over","box","rect_th",":","rectangle","thickness","hide_labels",":","hide","labels","hide_conf",":","hide","confidence","file_name",":","saving","name","Returns",":"]
code: def export_visuals(
      self,
      export_dir: str,
      text_size: float = None,
      rect_th: int = None,
      hide_labels: bool = False,
      hide_conf: bool = False,
      file_name: str = "prediction_visual",
  ):
      """
  
      Args:
          export_dir: directory for resulting visualization to be exported
          text_size: size of the category name over box
          rect_th: rectangle thickness
          hide_labels: hide labels
          hide_conf: hide confidence
          file_name: saving name
      Returns:
  
      """
      Path(export_dir).mkdir(parents=True, exist_ok=True)
      visualize_object_predictions(
          image=np.ascontiguousarray(self.image),
          object_prediction_list=self.object_prediction_list,
          rect_th=rect_th,
          text_size=text_size,
          text_th=None,
          color=None,
          hide_labels=hide_labels,
          hide_conf=hide_conf,
          output_dir=export_dir,
          file_name=file_name,
          export_format="png",
      )
  
imports: import copy
  from typing import Dict, List, Optional, Union
  import numpy
  from PIL import Image
  from sahi.annotation import ObjectAnnotation
  from sahi.utils.coco import CocoAnnotation, CocoPrediction
  from sahi.utils.cv import read_image_as_pil, visualize_object_predictions
  from sahi.utils.file import Path
label_desc: Use image node_id 2 for calling the PredictionResult obj's underlying member method code with example usage: obj.export_visuals(export_dir, text_size, rect_th, hide_labels, hide_conf, file_name) without return types