docstr: Detects the number of matching bits the predefined watermark with one
  or multiple images. Images should be in cv2 format, e.g. h x w x c BGR.
  
  Args:
      x: ([B], h w, c) in range [0, 255]
  
  Returns:
     number of matched bits ([B],)
docstr_tok: ["Detects","the","number","of","matching","bits","the","predefined","watermark","with","one","or","multiple","images",".","Images","should","be","in","cv2","format",",","e.g",".","h","x","w","x","c","BGR",".","Args",":","x",":","(","[","B","]",",","h","w",",","c",")","in","range","[","0",",","255","]","Returns",":","number","of","matched","bits","(","[","B","]",",",")"]
code: def __call__(self, x: np.ndarray) -> np.ndarray:
      """
      Detects the number of matching bits the predefined watermark with one
      or multiple images. Images should be in cv2 format, e.g. h x w x c BGR.
  
      Args:
          x: ([B], h w, c) in range [0, 255]
  
      Returns:
         number of matched bits ([B],)
      """
      squeeze = len(x.shape) == 3
      if squeeze:
          x = x[None, ...]
  
      bs = x.shape[0]
      detected = np.empty((bs, self.num_bits), dtype=bool)
      for k in range(bs):
          detected[k] = self.decoder.decode(x[k], "dwtDct")
      result = np.sum(detected == self.watermark, axis=-1)
      if squeeze:
          return result[0]
      else:
          return result
  
imports: import argparse
  import cv2
  import numpy
label_desc: Use image node_id 2 for calling the GetWatermarkMatch obj's underlying member method code with example usage: obj.__call__(x) and returns: result, result