<jupyter_start><jupyter_text>Face Detection<jupyter_code>img = cv.imread("C:\\Users\\ankit\\Documents\\Project Files\\Face detection 3.jpg")
gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
haar_cascade = cv.CascadeClassifier('haar_face.xml')
faces_rect = haar_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=4)
print(f'Number of faces found = {len(faces_rect)}')
for(x,y,w,h) in faces_rect:
    cv.rectangle(img,(x,y),(x+w,y+h),(0,255,0),thickness=2)
cv.imshow("Detected Faces",img)
cv.waitKey(0)<jupyter_output>Number of faces found = 7<jupyter_text>Face Detection Using Camera<jupyter_code>haar_cascade = cv.CascadeClassifier('haar_face.xml')
camera=cv.VideoCapture(0)
while True:
    check,frame=camera.read()
    faces_rect = haar_cascade.detectMultiScale(frame, scaleFactor=1.1, minNeighbors=5)
    for(x,y,w,h) in faces_rect:
        frame=cv.rectangle(frame,(x,y),(x+w,y+h),(0,255,0),thickness=2)
    cv.imshow("Detected Faces",frame)
    key=cv.waitKey(1)
    if key == ord('q'):
        break
camera.release()
cv.destroyAllWindows()
print(f'Number of faces found = {len(faces_rect)}')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16460176991150444, 'fraction_numerical': 0.021238938053097345, 'mean_word_length': 6.7465753424657535, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '389504', 'license': 'MIT', 'n_tokens_mistral': 469, 'n_tokens_neox': 450, 'n_words': 60, 'path': 'Face Detection/Face Detection.ipynb', 'repo_name': 'anish7503/Hacktoberfest-2021', 'size': '1130'}