code: def clip_det_res(self, points, img_height, img_width):
      for pno in range(points.shape[0]):
          points[pno, 0] = int(
              min(max(points[pno, 0], 0), img_width - 1)
          )
          points[pno, 1] = int(
              min(max(points[pno, 1], 0), img_height - 1)
          )
      return points
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import ast
  import base64
  import os
  import time
  from io import BytesIO
  import cv2
  import numpy
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from PIL import Image
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
  from paddlehub.utils.log import logger
label_desc: Use image node_id 6 for calling the ChineseTextDetectionDB obj's underlying member method code with example usage: obj.clip_det_res(points, img_height, img_width) and returns: points