code: def represent(
      img_path: Union[str, np.ndarray],
      model_name: str = "VGG-Face",
      enforce_detection: bool = True,
      detector_backend: str = "opencv",
      align: bool = True,
      normalization: str = "base",
  ) -> List[Dict[str, Any]]:
      """
      This function represents facial images as vectors. The function uses convolutional neural
      networks models to generate vector embeddings.
  
      Parameters:
              img_path (string): exact image path. Alternatively, numpy array (BGR) or based64
              encoded images could be passed. Source image can have many faces. Then, result will
              be the size of number of faces appearing in the source image.
  
              model_name (string): VGG-Face, Facenet, Facenet512, OpenFace, DeepFace, DeepID, Dlib,
              ArcFace, SFace
  
              enforce_detection (boolean): If no face could not be detected in an image, then this
              function will return exception by default. Set this to False not to have this exception.
              This might be convenient for low resolution images.
  
              detector_backend (string): set face detector backend to opencv, retinaface, mtcnn, ssd,
              dlib, mediapipe or yolov8. A special value `skip` could be used to skip face-detection
              and only encode the given image.
  
              align (boolean): alignment according to the eye positions.
  
              normalization (string): normalize the input image before feeding to model
  
      Returns:
              Represent function returns a list of object, each object has fields as follows:
              {
                  // Multidimensional vector
                  // The number of dimensions is changing based on the reference model.
                  // E.g. FaceNet returns 128 dimensional vector;
                  //      VGG-Face returns 2622 dimensional vector.
                  "embedding": np.array,
  
                  // Detected Facial-Area by Face detection in dict format.
                  // (x, y) is left-corner point, and (w, h) is the width and height
                  // If `detector_backend` == `skip`, it is the full image area and nonsense.
                  "facial_area": dict{"x": int, "y": int, "w": int, "h": int},
  
                  // Face detection confidence.
                  // If `detector_backend` == `skip`, will be 0 and nonsense.
                  "face_confidence": float
              }
      """
      return representation.represent(
          img_path=img_path,
          model_name=model_name,
          enforce_detection=enforce_detection,
          detector_backend=detector_backend,
          align=align,
          normalization=normalization,
      )
  
file_path: deepface/deepface/DeepFace.py
imports: import os
  import warnings
  import logging
  from typing import Any, Dict, List, Tuple, Union
  import numpy
  import pandas
  import tensorflow
  from deprecated import deprecated
  from deepface.commons import functions
  from deepface.commons.logger import Logger
  from deepface.modules import modeling, representation, verification, recognition, demography, detection, realtime
label_desc: Use image node_id 5 for calling a global function with example usage: represent(img_path, model_name, enforce_detection, detector_backend, align, normalization) and returns: representation