load the jpg file into a numpy array find all the faces in the image using the default hogbased model this method is fairly accurate but not as accurate as the cnn model and not gpu accelerated see also findfacesinpicturecnn py print the location of each face in this image you can access the actual face itself like this load the jpg file into a numpy array find all the faces in the image using the default hog based model this method is fairly accurate but not as accurate as the cnn model and not gpu accelerated see also find_faces_in_picture_cnn py print the location of each face in this image you can access the actual face itself like this
from PIL import Image
import face_recognition


image = face_recognition.load_image_file("biden.jpg")




face_locations = face_recognition.face_locations(image)

print("I found {} face(s) in this photograph.".format(len(face_locations)))

for face_location in face_locations:

    
    top, right, bottom, left = face_location
    print("A face is located at pixel location Top: {}, Left: {}, Bottom: {}, Right: {}".format(top, left, bottom, right))

    
    face_image = image[top:bottom, left:right]
    pil_image = Image.fromarray(face_image)
    pil_image.show()