code: def getDetectorPath(self, detect_network):
      if detect_network in self.support_detection_network:
          self.detect_network = detect_network
          if self.detect_network == "craft":
              from .detection import get_detector, get_textbox
          elif self.detect_network in ["dbnet18"]:
              from .detection_db import get_detector, get_textbox
          else:
              raise RuntimeError(
                  "Unsupport detector network. Support networks are craft and dbnet18."
              )
          self.get_textbox = get_textbox
          self.get_detector = get_detector
          corrupt_msg = "MD5 hash mismatch, possible file corruption"
          detector_path = os.path.join(
              self.model_storage_directory,
              self.detection_models[self.detect_network]["filename"],
          )
          if os.path.isfile(detector_path) == False:
              if not self.download_enabled:
                  raise FileNotFoundError(
                      "Missing %s and downloads disabled"
                      % detector_path
                  )
              LOGGER.warning(
                  "Downloading detection model, please wait. "
                  "This may take several minutes depending upon your network connection."
              )
              download_and_unzip(
                  self.detection_models[self.detect_network]["url"],
                  self.detection_models[self.detect_network][
                      "filename"
                  ],
                  self.model_storage_directory,
                  self.verbose,
              )
              assert (
                  calculate_md5(detector_path)
                  == self.detection_models[self.detect_network][
                      "md5sum"
                  ]
              ), corrupt_msg
              LOGGER.info("Download complete")
          elif (
              calculate_md5(detector_path)
              != self.detection_models[self.detect_network]["md5sum"]
          ):
              if not self.download_enabled:
                  raise FileNotFoundError(
                      "MD5 mismatch for %s and downloads disabled"
                      % detector_path
                  )
              LOGGER.warning(corrupt_msg)
              os.remove(detector_path)
              LOGGER.warning(
                  "Re-downloading the detection model, please wait. "
                  "This may take several minutes depending upon your network connection."
              )
              download_and_unzip(
                  self.detection_models[self.detect_network]["url"],
                  self.detection_models[self.detect_network][
                      "filename"
                  ],
                  self.model_storage_directory,
                  self.verbose,
              )
              assert (
                  calculate_md5(detector_path)
                  == self.detection_models[self.detect_network][
                      "md5sum"
                  ]
              ), corrupt_msg
      else:
          raise RuntimeError(
              "Unsupport detector network. Support networks are {}.".format(
                  ", ".join(self.support_detection_network)
              )
          )
  
      return detector_path
  
imports: from .recognition import get_recognizer, get_text
  from .utils import group_text_box, get_image_list, calculate_md5, get_paragraph, download_and_unzip, printProgressBar, diff, reformat_input, make_rotated_img_list, set_result_with_confidence, reformat_input_batched, merge_to_free
  from .config import *
  from bidi.algorithm import get_display
  import numpy
  import cv2
  import torch
  import os
  import sys
  from PIL import Image
  from logging import getLogger
  import yaml
  import json
label_desc: Use image node_id 2 for calling the Reader obj's underlying member method code with example usage: obj.getDetectorPath(detect_network) and returns: detector_path