code: def stream(
      db_path: str = "",
      model_name: str = "VGG-Face",
      detector_backend: str = "opencv",
      distance_metric: str = "cosine",
      enable_face_analysis: bool = True,
      source: Any = 0,
      time_threshold: int = 5,
      frame_threshold: int = 5,
  ) -> None:
      """
      This function applies real time face recognition and facial attribute analysis
  
      Parameters:
              db_path (string): facial database path. You should store some .jpg files in this folder.
  
              model_name (string): VGG-Face, Facenet, Facenet512, OpenFace, DeepFace, DeepID, Dlib,
              ArcFace, SFace
  
              detector_backend (string): opencv, retinaface, mtcnn, ssd, dlib, mediapipe or yolov8.
  
              distance_metric (string): cosine, euclidean, euclidean_l2
  
              enable_facial_analysis (boolean): Set this to False to just run face recognition
  
              source: Set this to 0 for access web cam. Otherwise, pass exact video path.
  
              time_threshold (int): how many second analyzed image will be displayed
  
              frame_threshold (int): how many frames required to focus on face
  
      """
  
      time_threshold = max(time_threshold, 1)
      frame_threshold = max(frame_threshold, 1)
  
      realtime.analysis(
          db_path=db_path,
          model_name=model_name,
          detector_backend=detector_backend,
          distance_metric=distance_metric,
          enable_face_analysis=enable_face_analysis,
          source=source,
          time_threshold=time_threshold,
          frame_threshold=frame_threshold,
      )
  
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 6 for calling a global function with example usage: stream(db_path, model_name, detector_backend, distance_metric, enable_face_analysis, source, time_threshold, frame_threshold) without return types