class_docstr: A text detector using the CRAFT architecture.
  
  Args:
      weights: The weights to use for the model. Currently, only `clovaai_general`
          is supported.
      load_from_torch: Whether to load the weights from the original PyTorch weights.
      optimizer: The optimizer to use for training the model.
      backbone_name: The backbone to use. Currently, only 'vgg' is supported.
class_docstr_tok: ["A","text","detector","using","the","CRAFT","architecture",".","Args",":","weights",":","The","weights","to","use","for","the","model",".","Currently",",","only","`","clovaai_general","`","is","supported",".","load_from_torch",":","Whether","to","load","the","weights","from","the","original","PyTorch","weights",".","optimizer",":","The","optimizer","to","use","for","training","the","model",".","backbone_name",":","The","backbone","to","use",".","Currently",",","only","'vgg","'","is","supported","."]
code: def __init__(
      self,
      weights="clovaai_general",
      load_from_torch=False,
      optimizer="adam",
      backbone_name="vgg",
  ):
      if weights is not None:
          pretrained_key = (weights, load_from_torch)
          assert (
              backbone_name == "vgg"
          ), "Pretrained weights available only for VGG."
          assert (
              pretrained_key in PRETRAINED_WEIGHTS
          ), "Selected weights configuration not found."
          weights_config = PRETRAINED_WEIGHTS[pretrained_key]
          weights_path = tools.download_and_verify(
              url=weights_config["url"],
              filename=weights_config["filename"],
              sha256=weights_config["sha256"],
          )
      else:
          weights_path = None
      self.model = build_keras_model(
          weights_path=weights_path, backbone_name=backbone_name
      )
      self.model.compile(loss="mse", optimizer=optimizer)
  
imports: import typing
  import cv2
  import numpy
  import tensorflow
  import efficientnet.tfkeras
  from tensorflow import keras
  from .None import tools
label_desc: Use image node_id 1 to create a new Detector object  with example: obj = Detector(weights, load_from_torch, optimizer, backbone_name)