code: def __call__(self, input_image):
      assert input_image.ndim == 3
      input_image = input_image[:, :, ::-1].copy()
      with torch.no_grad():
          image_hed = torch.from_numpy(input_image).float().cuda()
          image_hed = image_hed / 255.0
          image_hed = rearrange(image_hed, "h w c -> 1 c h w")
          edge = self.netNetwork(image_hed)[0]
          edge = (
              (edge.cpu().numpy() * 255.0).clip(0, 255).astype(np.uint8)
          )
          return edge[0]
  
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 2 for calling the HEDdetector obj's underlying member method code with example usage: obj.__call__(input_image) and returns: edge