code: def nms(x, t, s):
      x = cv2.GaussianBlur(x.astype(np.float32), (0, 0), s)
  
      f1 = np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], dtype=np.uint8)
      f2 = np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], dtype=np.uint8)
      f3 = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=np.uint8)
      f4 = np.array([[0, 0, 1], [0, 1, 0], [1, 0, 0]], dtype=np.uint8)
  
      y = np.zeros_like(x)
  
      for f in [f1, f2, f3, f4]:
          np.putmask(y, cv2.dilate(x, kernel=f) == x, x)
  
      z = np.zeros_like(y, dtype=np.uint8)
      z[y > t] = 255
      return z
  
file_path: lavis/lavis/common/annotator/hed/__init__.py
imports: import numpy
  import cv2
  import os
  import torch
  from einops import rearrange
  from annotator.util import annotator_ckpts_path
label_desc: Use image node_id 1 for calling a global function with example usage: nms(x, t, s) and returns: z