parameters: (polys, thres=0.3)
return_statement: return standard_nms(np.array(S), thres)
docstring: locality aware nms of EAST
      :param polys: a N*9 numpy array. first 8 coordinates, then prob
      :return: boxes after nms
docstring_summary: locality aware nms of EAST
      :param polys: a N*9 numpy array. first 8 coordinates, then prob
      :return: boxes after nms
docstring_tokens: locality aware nms of EAST : param polys : a N * 9 numpy array . first 8 coordinates then prob : return : boxes after nms
function: def nms_locality(polys, thres=0.3):
      """
      locality aware nms of EAST
      :param polys: a N*9 numpy array. first 8 coordinates, then prob
      :return: boxes after nms
      """
      S = []
      p = None
      for g in polys:
          if p is not None and intersection(g, p) > thres:
              p = weighted_merge(g, p)
          else:
              if p is not None:
                  S.append(p)
              p = g
      if p is not None:
          S.append(p)
  
      if len(S) == 0:
          return np.array([])
      return standard_nms(np.array(S), thres)
function_tokens: def nms_locality ( polys , thres = 0.3 ) : S = [ ] p = None for g in polys : if p is not None and intersection ( g , p ) > thres : p = weighted_merge ( g , p ) else : if p is not None : S . append ( p ) p = g if p is not None : S . append ( p ) if len ( S ) == 0 : return np . array ( [ ] ) return standard_nms ( np . array ( S ) , thres )