code: def face_detect(self, images):
      detector = face_detection.FaceAlignment(
          face_detection.LandmarksType._2D,
          flip_input=False,
          face_detector=self.face_detector,
      )
  
      batch_size = self.face_det_batch_size
  
      while 1:
          predictions = []
          try:
              for i in tqdm(range(0, len(images), batch_size)):
                  predictions.extend(
                      detector.get_detections_for_batch(
                          np.array(images[i : i + batch_size])
                      )
                  )
          except RuntimeError:
              if batch_size == 1:
                  raise RuntimeError(
                      "Image too big to run face detection on GPU. Please use the --resize_factor argument"
                  )
              batch_size //= 2
              print(
                  "Recovering from OOM error; New batch size: {}".format(
                      batch_size
                  )
              )
              continue
          break
  
      results = []
      pady1, pady2, padx1, padx2 = self.pads
      for rect, image in zip(predictions, images):
          if rect is None:
              cv2.imwrite(
                  "temp/faulty_frame.jpg", image
              )  # check this frame where the face was not detected.
              raise ValueError(
                  "Face not detected! Ensure the video contains a face in all the frames."
              )
  
          y1 = max(0, rect[1] - pady1)
          y2 = min(image.shape[0], rect[3] + pady2)
          x1 = max(0, rect[0] - padx1)
          x2 = min(image.shape[1], rect[2] + padx2)
  
          results.append([x1, y1, x2, y2])
  
      boxes = np.array(results)
      if not self.nosmooth:
          boxes = self.get_smoothened_boxes(boxes, T=5)
      results = [
          [image[y1:y2, x1:x2], (y1, y2, x1, x2)]
          for image, (x1, y1, x2, y2) in zip(images, boxes)
      ]
  
      del detector
      return results
  
file_path: PaddleHub/modules/image/Image_gan/gan/wav2lip/model.py
imports: from os import listdir, path, makedirs
  import platform
  import numpy
  import scipy, cv2, os, sys, argparse
  import json, subprocess, random, string
  from tqdm import tqdm
  from glob import glob
  import paddle
  from paddle.utils.download import get_weights_path_from_url
  from ppgan.faceutils import face_detection
  from ppgan.utils import audio
  from ppgan.models.generators.wav2lip import Wav2Lip
label_desc: Use image node_id 3 for calling the Wav2LipPredictor obj's underlying member method code with example usage: obj.face_detect(images) and returns: results