class_docstr: The post process for Differentiable Binarization (DB).
class_docstr_tok: ["The","post","process","for","Differentiable","Binarization","(","DB",")","."]
docstr: box_score_fast: use bbox mean score as the mean score
docstr_tok: ["box_score_fast",":","use","bbox","mean","score","as","the","mean","score"]
code: def box_score_fast(self, bitmap, _box):
      """
      box_score_fast: use bbox mean score as the mean score
      """
      h, w = bitmap.shape[:2]
      box = _box.copy()
      xmin = np.clip(
          np.floor(box[:, 0].min()).astype("int32"), 0, w - 1
      )
      xmax = np.clip(np.ceil(box[:, 0].max()).astype("int32"), 0, w - 1)
      ymin = np.clip(
          np.floor(box[:, 1].min()).astype("int32"), 0, h - 1
      )
      ymax = np.clip(np.ceil(box[:, 1].max()).astype("int32"), 0, h - 1)
  
      mask = np.zeros(
          (ymax - ymin + 1, xmax - xmin + 1), dtype=np.uint8
      )
      box[:, 0] = box[:, 0] - xmin
      box[:, 1] = box[:, 1] - ymin
      cv2.fillPoly(mask, box.reshape(1, -1, 2).astype("int32"), 1)
      return cv2.mean(bitmap[ymin : ymax + 1, xmin : xmax + 1], mask)[0]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import cv2
  import paddle
  from shapely.geometry import Polygon
  import pyclipper
label_desc: Use image node_id 6 for calling the DBPostProcess obj's underlying member method code with example usage: obj.box_score_fast(bitmap, _box) and returns: cv2