code: def extract_bbox(self, image):
      detector = face_detection.FaceAlignment(
          face_detection.LandmarksType._2D,
          flip_input=False,
          face_detector=self.face_detector,
      )
  
      frame = [image]
      predictions = detector.get_detections_for_image(np.array(frame))
      person_num = len(predictions)
      if person_num == 0:
          return np.array([])
      results = []
      face_boxs = []
      h, w, _ = image.shape
      for rect in predictions:
          bh = rect[3] - rect[1]
          bw = rect[2] - rect[0]
          cy = rect[1] + int(bh / 2)
          cx = rect[0] + int(bw / 2)
          margin = max(bh, bw)
          y1 = max(0, cy - margin)
          x1 = max(0, cx - int(0.8 * margin))
          y2 = min(h, cy + margin)
          x2 = min(w, cx + int(0.8 * margin))
          area = (y2 - y1) * (x2 - x1)
          results.append([x1, y1, x2, y2, area])
      # if a person has more than one bbox, keep the largest one
      # maybe greedy will be better?
      sorted(results, key=lambda area: area[4], reverse=True)
      results_box = [results[0]]
      for i in range(1, person_num):
          num = len(results_box)
          add_person = True
          for j in range(num):
              pre_person = results_box[j]
              iou = self.IOU(
                  pre_person[0],
                  pre_person[1],
                  pre_person[2],
                  pre_person[3],
                  pre_person[4],
                  results[i][0],
                  results[i][1],
                  results[i][2],
                  results[i][3],
                  results[i][4],
              )
              if iou > 0.5:
                  add_person = False
                  break
          if add_person:
              results_box.append(results[i])
      boxes = np.array(results_box)
      return boxes
  
imports: import os
  import sys
  import math
  import pickle
  import yaml
  import imageio
  import numpy
  from tqdm import tqdm
  from scipy.spatial import ConvexHull
  import cv2
  import paddle
  from ppgan.utils.download import get_path_from_url
  from ppgan.utils.animate import normalize_kp
  from ppgan.modules.keypoint_detector import KPDetector
  from ppgan.models.generators.occlusion_aware import OcclusionAwareGenerator
  from ppgan.faceutils import face_detection
label_desc: Use image node_id 7 for calling the FirstOrderPredictor obj's underlying member method code with example usage: obj.extract_bbox(image) and returns: boxes, np