Skip to content

Instantly share code, notes, and snippets.

View kapilraghuwanshi's full-sized avatar
🤠
Trying to be better at Problem Solving!

Kapil Raghuwanshi kapilraghuwanshi

🤠
Trying to be better at Problem Solving!
View GitHub Profile
import PIL.Image
import PIL.ImageDraw
import face_recognition
# Load the jpg file into a numpy array
given_image = face_recognition.load_image_file('SchoolKids.jpg')
# Find all the faces in the image
face_locations = face_recognition.face_locations(given_image)
@kapilraghuwanshi
kapilraghuwanshi / face_detection.py
Created June 13, 2020 08:48
Console output for face_detection.py
We found 5 face(s) in this image.
A face is detected at pixel location Top: 1454, Left: 3451, Bottom: 1775, Right: 3130
A face is detected at pixel location Top: 1784, Left: 1904, Bottom: 1939, Right: 1749
A face is detected at pixel location Top: 1818, Left: 2351, Bottom: 1973, Right: 2196
A face is detected at pixel location Top: 1830, Left: 1529, Bottom: 1959, Right: 1400
A face is detected at pixel location Top: 1878, Left: 2445, Bottom: 1967, Right: 2355
import PIL.Image
import PIL.ImageDraw
import face_recognition
# Load the jpg file into a numpy array
given_image = face_recognition.load_image_file('SchoolKids.jpg')
# Find all the faces in the image
face_locations = face_recognition.face_locations(given_image)