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
  
file_path: PaddleOCR/tools/infer/predict_e2e.py
imports: import os
  import sys
  import cv2
  import numpy
  import time
  import sys
  import tools.infer.utility
  from ppocr.utils.logging import get_logger
  from ppocr.utils.utility import get_image_file_list, check_and_read
  from ppocr.data import create_operators, transform
  from ppocr.postprocess import build_post_process
label_desc: Use image node_id 2 for calling the TextE2E obj's underlying member method code with example usage: obj.clip_det_res(points, img_height, img_width) and returns: points