<jupyter_start><jupyter_text>Importing Libraries<jupyter_code>import cv2
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Taking Inputs<jupyter_code>input_img = cv2.imread("Faces.jpg") #Put the path of your .jpg file here.
input_img = cv2.cvtColor(input_img, cv2.COLOR_BGR2RGB)
detector = cv2.CascadeClassifier("haarcascade_frontalface_alt.xml")<jupyter_output><empty_output><jupyter_text>Processing<jupyter_code>faces = detector.detectMultiScale(input_img, 1.05, 5) #Scale factor = 1.05, min.neighbours = 5

for face in faces:
    x, y, w, h = face;
    input_img = cv2.rectangle(input_img, (x, y), (x+w, y+h), (255, 0, 0), 2)
    
plt.imshow(input_img)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1317614424410541, 'fraction_numerical': 0.02912621359223301, 'mean_word_length': 7.112359550561798, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '55572', 'license': 'Unlicense', 'n_tokens_mistral': 310, 'n_tokens_neox': 294, 'n_words': 51, 'path': 'Face_Detection.ipynb', 'repo_name': 'helewrer3/Face_Detection', 'size': '721'}