class_docstr: The post process for SAST.
docstr: Restore quad.
docstr_tok: ["Restore","quad","."]
code: def restore_quad(self, tcl_map, tcl_map_thresh, tvo_map):
      """Restore quad."""
      xy_text = np.argwhere(tcl_map[:, :, 0] > tcl_map_thresh)
      xy_text = xy_text[:, ::-1]  # (n, 2)
  
      # Sort the text boxes via the y axis
      xy_text = xy_text[np.argsort(xy_text[:, 1])]
  
      scores = tcl_map[xy_text[:, 1], xy_text[:, 0], 0]
      scores = scores[:, np.newaxis]
  
      # Restore
      point_num = int(tvo_map.shape[-1] / 2)
      assert point_num == 4
      tvo_map = tvo_map[xy_text[:, 1], xy_text[:, 0], :]
      xy_text_tile = np.tile(
          xy_text, (1, point_num)
      )  # (n, point_num * 2)
      quads = xy_text_tile - tvo_map
  
      return scores, quads, xy_text
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import numpy
  from .locality_aware_nms import nms_locality
  import paddle
  import cv2
  import time
label_desc: Use image node_id 5 for calling the SASTPostProcess obj's underlying member method code with example usage: obj.restore_quad(tcl_map, tcl_map_thresh, tvo_map) and returns: scores,  quads,  xy_text