{"id":15135998,"url":"https://github.com/abeed04/face-recognition-using-computer-vision-cv2","last_synced_at":"2026-02-08T00:33:26.666Z","repository":{"id":245676530,"uuid":"818938266","full_name":"abeed04/Face-Recognition-using-Computer-Vision-Cv2","owner":"abeed04","description":"OpenCV (cv2) can be used for face recognition by detecting faces, extracting facial features, and comparing them to a database of known faces.","archived":false,"fork":false,"pushed_at":"2024-06-24T06:52:18.000Z","size":2966,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T08:33:00.914Z","etag":null,"topics":["cmake","cv2-library","dlib-face-recognition","face-recognition","flask","numpy","pycharm-ide","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abeed04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-23T09:58:31.000Z","updated_at":"2024-07-19T11:29:58.000Z","dependencies_parsed_at":"2024-06-23T11:22:38.388Z","dependency_job_id":"60b368be-1051-4e0b-8028-5660bfe4c49f","html_url":"https://github.com/abeed04/Face-Recognition-using-Computer-Vision-Cv2","commit_stats":null,"previous_names":["abeed04/face-recognition-using-computer-vision-cv2-","abeed04/face-recognition-using-computer-vision-cv2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeed04%2FFace-Recognition-using-Computer-Vision-Cv2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeed04%2FFace-Recognition-using-Computer-Vision-Cv2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeed04%2FFace-Recognition-using-Computer-Vision-Cv2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeed04%2FFace-Recognition-using-Computer-Vision-Cv2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abeed04","download_url":"https://codeload.github.com/abeed04/Face-Recognition-using-Computer-Vision-Cv2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247425419,"owners_count":20936947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cv2-library","dlib-face-recognition","face-recognition","flask","numpy","pycharm-ide","python"],"created_at":"2024-09-26T06:03:14.503Z","updated_at":"2026-02-08T00:33:26.637Z","avatar_url":"https://github.com/abeed04.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eFace Recognition with OpenCV(Cv2)\u003c/h1\u003e\nThis project demonstrates real-time face recognition using OpenCV and the face_recognition library in Python. It identifies faces in a live video stream and compares them to known individuals from pre-loaded images.\n\u003cbr/\u003e\u003cbr/\u003e\n\u003cimg align=\"center\"  src=\"https://pyimagesearch.com/wp-content/uploads/2018/09/opencv_face_reco_facenet.jpg\"/\u003e\n\u003cbr/\u003e\n\u003ch2 align=\"center\"\u003eRequirements\u003c/h2\u003e\n\n- Python 3.x\n- OpenCV (cv2)\n- Face_recognition\n- Mobilenet and coco pretrained model\n- Frozen model\n\u003ch2 align=\"center\"\u003eExplanation\u003c/h2\u003e\n\u003ch3 align=\"left\"\u003eImports\u003c/h3\u003e\n\n-  The script imports necessary libraries, including OpenCV (cv2) and face_recognition\n\n\u003ch3 align=\"left\"\u003eImage Loading\u003c/h3\u003e\n\n- Known faces are loaded using \"face_recognition.load_image_file\".\n\n\u003ch3 align=\"left\"\u003eEncoding Generation\u003c/h3\u003e\n\n- Encodings of known faces are generated using \"face_recognition.face_encodings\". \n\u003ch3 align=\"left\"\u003eVideo Capture\u003c/h3\u003e\n\n-  A video capture object is created to access the webcam stream.\n\u003ch3 align=\"left\"\u003eMain Loop\u003c/h3\u003e\n\n- Reads a frame from the video capture.\n- Resizes the frame for faster processing.\n- Converts the frame to BGR color format (OpenCV's default).\n- face_locations = face_recognition.face_locations(rgb_small_frame) to detect faces in the resized frame if needed.\n- Compares each face encoding against known face encodings using face_recognition.compare_faces.\n\u003ch3 align=\"left\"\u003eVideo Display\u003c/h3\u003e\n\n- The processed frame with bounding boxes and names (if applicable) is displayed using cv2.imshow\n\u003ch3 align=\"left\"\u003eExiting\u003c/h3\u003e\n\n- The script exits when the 'q' key is pressed.\n- The video capture and OpenCV windows are released for proper cleanu\n\n\u003ch2 align=\"center\"\u003eCustomization\u003c/h2\u003e\n\n- You can modify the script to include more known faces by adding their images and corresponding names to the known_faces folder.\n- You can adjust the fx and fy values in small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25) to control the resizing factor for processing efficiency.\n- Explore more advanced face recognition techniques from the face_recognition library, such as face distance thresholds for more robust matching.\n\n\u003ch2 align=\"center\"\u003eUse Cases\u003c/h2\u003e\n\u003ch3 align=\"left\"\u003eMobile Applications\u003c/h3\u003e\n\n- Augmented Reality (AR): Enhance user experience by overlaying information or virtual objects onto real-world scenes. Imagine pointing your phone camera at a building and seeing its blueprints or historical information displayed. MobileNet's efficiency allows for real-time object detection on smartphones for such AR applications.\n- Object Recognition and Search: Enable users to point their phones at objects to identify them or search for similar items online. This could be helpful for identifying plants, clothing items, furniture, or even landmarks while traveling.\n- Security and Surveillance: Implement real-time object detection for security cameras on mobile devices. For example, detect people trespassing in restricted areas or identify suspicious objects left unattended.\n\u003ch3 align=\"left\"\u003eEmbedded Systems\u003c/h3\u003e\n\n- Smart Home Automation: Use object detection to trigger automations. For instance, detect a person entering a room and turn on the lights, or identify a pet and activate a feeder.\n- Industrial Automation: Deploy object detection systems on robots or drones for tasks like inventory management, defect detection in manufacturing processes, or monitoring machinery for safety hazards.\n- Traffic Monitoring: Implement object detection in traffic cameras to analyze traffic flow, identify accidents, and optimize traffic light timing. MobileNet's efficiency is crucial for real-time processing on embedded devices often used in these scenarios.\n\u003ch3 align=\"left\"\u003eGeneral Object Detection Tasks\u003c/h3\u003e\n\n- Retail Industry: Use object detection for tasks like automatic checkout (identifying and pricing items), inventory management (tracking stock levels), or analyzing customer behavior in stores.\n- Agriculture: Implement object detection in drones or ground vehicles to assess crop health, identify pests or diseases, and optimize resource use.\n- Environmental Monitoring: Use object detection to track wildlife populations, monitor deforestation, or detect illegal activities in protected areas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeed04%2Fface-recognition-using-computer-vision-cv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabeed04%2Fface-recognition-using-computer-vision-cv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeed04%2Fface-recognition-using-computer-vision-cv2/lists"}