parameters: (prob, thres=0.1)
return_statement: return pt
docstring: Compute landmark from prob
      prob : [RO, E1]
      mode : mean or max
      return pt : [x, y]
docstring_summary: Compute landmark from prob
      prob : [RO, E1]
      mode : mean or max
      return pt : [x, y]
docstring_tokens: Compute landmark from prob prob : [ RO E1 ] mode : mean or max return pt : [ x y ]
function: def get_landmark_from_prob_fast(prob, thres=0.1):
      """
      Compute landmark from prob
      prob : [RO, E1]
      mode : mean or max
      return pt : [x, y]
      """
  
      #print("get_landmark_from_prob_fast, start ", file=sys.stderr)
      sys.stderr.flush()
  
      pt = None
      
      if(thres>0 and np.max(prob)<thres):
          return pt
      else:
          v = np.unravel_index(np.argmax(prob), prob.shape)
          pt = np.zeros(2)
          pt[0] = v[1]
          pt[1] = v[0]
  
          return pt
  
      #print("get_landmark_from_prob_fast, end ", file=sys.stderr)
      sys.stderr.flush()
      return pt
function_tokens: def get_landmark_from_prob_fast ( prob , thres = 0.1 ) : #print("get_landmark_from_prob_fast, start ", file=sys.stderr) sys . stderr . flush ( ) pt = None if ( thres > 0 and np . max ( prob ) < thres ) : return pt else : v = np . unravel_index ( np . argmax ( prob ) , prob . shape ) pt = np . zeros ( 2 ) pt [ 0 ] = v [ 1 ] pt [ 1 ] = v [ 0 ] return pt #print("get_landmark_from_prob_fast, end ", file=sys.stderr) sys . stderr . flush ( ) return pt