application_vnd.jupyter.stderr_output_3.png text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
import cv2

face_model = cv2.CascadeClassifier('../input/haarcascades/haarcascade_frontalface_default.xml')

img = cv2.imread('../input/face-mask-detection/images/maksssksksss244.png')
img = cv2.cvtColor(img, cv2.IMREAD_GRAYSCALE)
faces = face_model.detectMultiScale(img, scaleFactor=1.1, minNeighbors=4)
out_img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
for x, y, w, h in faces:
    cv2.rectangle(out_img, (x, y), (x + w, y + h), (0, 0, 255), 1)
plt.figure(figsize=(12, 12))
plt.imshow(out_img)