CodingMSTR LogoCodingMSTR
Final Year Projects with Source Code
Bundle Package (5 Projects)

Final Year Projects with Source Code

Looking for a high-quality Final Year Project with complete sourcecode? CodingMSTR offers carefully developed software projects forComputer Science, IT, AI, Machine Learning, Web Development, Mobile AppDevelopment, and Full-Stack Engineering. Every project is designed tohelp students understand real-world software architecture, developmentpractices, and deployment while accelerating project completion.

Bundle Deal Price199.00

Python Face Detection Program

PythonMachine LearningFinal Year Project

Python Face Detection Program

This project is fully included in the collection bundle!

Buy the bundle above to download this project source code along with all other projects.

Project Screenshots

Project Description

import cv2

# Load the pre-trained face detection model from OpenCV
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')

# Start the video capture from the webcam
cap = cv2.VideoCapture(0)

while True:
    # Capture frame-by-frame
    ret, frame = cap.read()

    # Convert the frame to grayscale (face detection works better in grayscale)
    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

    # Detect faces in the frame
    faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30))

    # Draw rectangles around the faces
    for (x, y, w, h) in faces:
        cv2.rectangle(frame, (x, y), (x+w, y+h), (255, 0, 0), 2)

    # Display the resulting frame
    cv2.imshow('Face Detection', frame)

    # Break the loop if 'q' is pressed
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

# Release the capture and close any open windows
cap.release()
cv2.destroyAllWindows()

Demo Video

Final Year Projects with Source Code Source Code Bundle | CodingMSTR