code: def load_img(path: str) -> torch.Tensor:
      image = Image.open(path)
      if not image.mode == "RGB":
          image = image.convert("RGB")
      image_transforms = T.Compose(
          [
              T.ToTensor(),
          ]
      )
      return image_transforms(image)[None, ...]
  
file_path: generative-models/scripts/util/detection/nsfw_and_watermark_dectection.py
imports: import os
  import clip
  import numpy
  import torch
  import torchvision.transforms
  from PIL import Image
label_desc: Use image node_id 4 for calling a global function with example usage: load_img(path) and returns: image_transforms