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