code: def detection_predictor(
      arch: Any = "db_resnet50",
      pretrained: bool = False,
      assume_straight_pages: bool = True,
      **kwargs: Any,
  ) -> DetectionPredictor:
      """Text detection architecture.
  
      >>> import numpy as np
      >>> from doctr.models import detection_predictor
      >>> model = detection_predictor(arch='db_resnet50', pretrained=True)
      >>> input_page = (255 * np.random.rand(600, 800, 3)).astype(np.uint8)
      >>> out = model([input_page])
  
      Args:
      ----
          arch: name of the architecture or model itself to use (e.g. 'db_resnet50')
          pretrained: If True, returns a model pre-trained on our text detection dataset
          assume_straight_pages: If True, fit straight boxes to the page
          **kwargs: optional keyword arguments passed to the architecture
  
      Returns:
      -------
          Detection predictor
      """
      return _predictor(
          arch, pretrained, assume_straight_pages, **kwargs
      )
  
imports: from typing import Any, List
  from doctr.file_utils import is_tf_available, is_torch_available
  from ..None import detection
  from ..preprocessor import PreProcessor
  from .predictor import DetectionPredictor
label_desc: Use image node_id 2 for calling a global function with example usage: detection_predictor(arch, pretrained, assume_straight_pages) and returns: _predictor