code: def __call__(self, images: torch.Tensor) -> torch.Tensor:
      imgs = clip_process_images(images)
      if self._device is None:
          self._device = next(
              p for p in self.clip_model.parameters()
          ).device
      image_features = self.clip_model.encode_image(
          imgs.to(self._device)
      )
      image_features = (
          image_features.detach().cpu().numpy().astype(np.float16)
      )
      p_pred = predict_proba(
          image_features, self.cpu_p_weights, self.cpu_p_biases
      )
      w_pred = predict_proba(
          image_features, self.cpu_w_weights, self.cpu_w_biases
      )
      print(
          f"p_pred = {p_pred}, w_pred = {w_pred}"
      ) if self.verbose else None
      query = p_pred > self.p_threshold
      if query.sum() > 0:
          print(
              f"Hit for p_threshold: {p_pred}"
          ) if self.verbose else None
          images[query] = T.GaussianBlur(99, sigma=(100.0, 100.0))(
              images[query]
          )
      query = w_pred > self.w_threshold
      if query.sum() > 0:
          print(
              f"Hit for w_threshold: {w_pred}"
          ) if self.verbose else None
          images[query] = T.GaussianBlur(99, sigma=(100.0, 100.0))(
              images[query]
          )
      return images
  
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 2 for calling the DeepFloydDataFiltering obj's underlying member method code with example usage: obj.__call__(images) and returns: images