class_docstr: A text detector using the CRNN architecture.
  
  Args:
      alphabet: The alphabet the model should recognize.
      build_params: A dictionary of build parameters for the model.
          See `keras_ocr.recognition.build_model` for details.
      weights: The starting weight configuration for the model.
      include_top: Whether to include the final classification layer in the model (set
          to False to use a custom alphabet).
class_docstr_tok: ["A","text","detector","using","the","CRNN","architecture",".","Args",":","alphabet",":","The","alphabet","the","model","should","recognize",".","build_params",":","A","dictionary","of","build","parameters","for","the","model",".","See","`","keras_ocr.recognition.build_model","`","for","details",".","weights",":","The","starting","weight","configuration","for","the","model",".","include_top",":","Whether","to","include","the","final","classification","layer","in","the","model","(","set","to","False","to","use","a","custom","alphabet",")","."]
docstr: Recognize text from images using lists of bounding boxes.
  
  Args:
      images: A list of input images, supplied as numpy arrays with shape
          (H, W, 3).
      boxes: A list of groups of boxes, one for each image
docstr_tok: ["Recognize","text","from","images","using","lists","of","bounding","boxes",".","Args",":","images",":","A","list","of","input","images",",","supplied","as","numpy","arrays","with","shape","(","H",",","W",",","3",")",".","boxes",":","A","list","of","groups","of","boxes",",","one","for","each","image"]
code: def recognize_from_boxes(
      self, images, box_groups, **kwargs
  ) -> typing.List[typing.List[str]]:
      """Recognize text from images using lists of bounding boxes.
  
      Args:
          images: A list of input images, supplied as numpy arrays with shape
              (H, W, 3).
          boxes: A list of groups of boxes, one for each image
      """
      assert len(box_groups) == len(
          images
      ), "You must provide the same number of box groups as images."
      crops = []
      start_end: typing.List[typing.Tuple[int, int]] = []
      for image, boxes in zip(images, box_groups):
          image = tools.read(image)
          if (
              self.prediction_model.input_shape[-1] == 1
              and image.shape[-1] == 3
          ):
              # Convert color to grayscale
              image = cv2.cvtColor(image, code=cv2.COLOR_RGB2GRAY)
          for box in boxes:
              crops.append(
                  tools.warpBox(
                      image=image,
                      box=box,
                      target_height=self.model.input_shape[1],
                      target_width=self.model.input_shape[2],
                  )
              )
          start = 0 if not start_end else start_end[-1][1]
          start_end.append((start, start + len(boxes)))
      if not crops:
          return [[]] * len(images)
      X = np.array(crops, dtype="float32") / 255
      if len(X.shape) == 3:
          X = X[..., np.newaxis]
      predictions = [
          "".join(
              [
                  self.alphabet[idx]
                  for idx in row
                  if idx not in [self.blank_label_idx, -1]
              ]
          )
          for row in self.prediction_model.predict(X, **kwargs)
      ]
      return [predictions[start:end] for start, end in start_end]
  
file_path: keras-ocr/keras_ocr/recognition.py
imports: import typing
  import string
  import tensorflow
  from tensorflow import keras
  import numpy
  import cv2
  from .None import tools
label_desc: Use image node_id 4 for calling the Recognizer obj's underlying member method code with example usage: obj.recognize_from_boxes(images, box_groups) and returns: unknown, unknown