class_docstr: An abstract class representing a face detector.
  
  Any other face detection implementation must subclass it. All subclasses
  must implement ``detect_from_image``, that return a list of detected
  bounding boxes. Optionally, for speed considerations detect from path is
  recommended.
docstr: Detects faces in a given image.
  
  This function detects the faces present in a provided BGR(usually)
  image. The input can be either the image itself or the path to it.
  
  Arguments:
      tensor_or_path {numpy.ndarray, torch.tensor or string} -- the path
      to an image or the image itself.
  
  Example::
  
      >>> path_to_image = 'data/image_01.jpg'
      ...   detected_faces = detect_from_image(path_to_image)
      [A list of bounding boxes (x1, y1, x2, y2)]
      >>> image = cv2.imread(path_to_image)
      ...   detected_faces = detect_from_image(image)
      [A list of bounding boxes (x1, y1, x2, y2)]
docstr_tok: ["Detects","faces","in","a","given","image",".","This","function","detects","the","faces","present","in","a","provided","BGR","(","usually",")","image",".","The","input","can","be","either","the","image","itself","or","the","path","to","it",".","Arguments",":","tensor_or_path","{","numpy.ndarray",",","torch.tensor","or","string","}","--","the","path","to","an","image","or","the","image","itself",".","Example",":",":",">",">",">","path_to_image","=","'data\/image_01.jpg'","...","detected_faces","=","detect_from_image","(","path_to_image",")","[","A","list","of","bounding","boxes","(","x1",",","y1",",","x2",",","y2",")","]",">",">",">","image","=","cv2.imread","(","path_to_image",")","...","detected_faces","=","detect_from_image","(","image",")","[","A","list","of","bounding","boxes","(","x1",",","y1",",","x2",",","y2",")","]"]
code: def detect_from_image(self, tensor_or_path):
      """Detects faces in a given image.
  
      This function detects the faces present in a provided BGR(usually)
      image. The input can be either the image itself or the path to it.
  
      Arguments:
          tensor_or_path {numpy.ndarray, torch.tensor or string} -- the path
          to an image or the image itself.
  
      Example::
  
          >>> path_to_image = 'data/image_01.jpg'
          ...   detected_faces = detect_from_image(path_to_image)
          [A list of bounding boxes (x1, y1, x2, y2)]
          >>> image = cv2.imread(path_to_image)
          ...   detected_faces = detect_from_image(image)
          [A list of bounding boxes (x1, y1, x2, y2)]
  
      """
      raise NotImplementedError
  
file_path: face-alignment/face_alignment/detection/core.py
imports: import logging
  import glob
  from tqdm import tqdm
  import numpy
  import torch
  from skimage import io
label_desc: Use image node_id 2 for calling the FaceDetector obj's underlying member method code with example usage: obj.detect_from_image(tensor_or_path) without return types