{"id":22763190,"url":"https://github.com/ramprasathmk/automatic-attendance-system-using-face-recognition","last_synced_at":"2025-07-27T03:05:53.920Z","repository":{"id":253558586,"uuid":"843862818","full_name":"ramprasathmk/Automatic-Attendance-System-using-Face-Recognition","owner":"ramprasathmk","description":"This project is ideal for implementing a real-time attendance system using facial recognition.","archived":false,"fork":false,"pushed_at":"2024-10-25T15:06:11.000Z","size":4204,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-11T11:07:29.427Z","etag":null,"topics":["attendance","attendance-system","face-recognition","face-recognition-attendance-system","face-recognition-python","python","python3","python310"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ramprasathmk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-17T16:41:18.000Z","updated_at":"2024-11-04T09:00:29.000Z","dependencies_parsed_at":"2024-12-11T11:07:31.945Z","dependency_job_id":"3435e7f2-8218-4a37-b7f3-35996af39514","html_url":"https://github.com/ramprasathmk/Automatic-Attendance-System-using-Face-Recognition","commit_stats":null,"previous_names":["ramprasathmk/attandance_system","ramprasathmk/automatic-attendance-system-for-face-recognition","ramprasathmk/automatic-attendance-system-using-face-recognition"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ramprasathmk/Automatic-Attendance-System-using-Face-Recognition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramprasathmk%2FAutomatic-Attendance-System-using-Face-Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramprasathmk%2FAutomatic-Attendance-System-using-Face-Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramprasathmk%2FAutomatic-Attendance-System-using-Face-Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramprasathmk%2FAutomatic-Attendance-System-using-Face-Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramprasathmk","download_url":"https://codeload.github.com/ramprasathmk/Automatic-Attendance-System-using-Face-Recognition/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramprasathmk%2FAutomatic-Attendance-System-using-Face-Recognition/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267293761,"owners_count":24065321,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["attendance","attendance-system","face-recognition","face-recognition-attendance-system","face-recognition-python","python","python3","python310"],"created_at":"2024-12-11T11:07:31.298Z","updated_at":"2025-07-27T03:05:53.883Z","avatar_url":"https://github.com/ramprasathmk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automatic Attendance System (Face Recognition)\n\n\u003cimg src=\"https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse3.mm.bing.net%2Fth%3Fid%3DOIP.w8cgJkXfLSuZKmIf4UvjnQHaEQ%26pid%3DApi\u0026f=1\u0026ipt=8f4b6d9545b0c482d8a9239910ccd7e902cf161cca416f3b6d202cfde55b5063\u0026ipo=images\" alt=\"Face Recognition\" align=\"center\" loading=\"lazy\"\u003e\n\n\n## Description\n- This project is developed in **Windows OS**.\n\n\n## Working Principle\n### 1. **Modules Imported:**\n   - `face_recognition`: Used for detecting and encoding faces.\n   - `cv2` (OpenCV): For capturing video and displaying the results.\n   - `numpy`: For numerical operations.\n   - `csv`: To write the attendance logs into a CSV file.\n   - `datetime`: To get the current date and time for logging.\n\n### 2. **Camera Initialization:**\n   - The camera is initialized using OpenCV (`cv2.VideoCapture(camera)`), where the default camera is set to `0`. If an external camera is used, you can change this value.\n\n### 3. **Loading and Encoding Known Faces:**\n   - Several face images (e.g., A, Surjith, Ramprasath, etc.) are loaded using `face_recognition.load_image_file()`.\n   - The faces are encoded using `face_recognition.face_encodings()` and stored in a list `known_face_encoding` for later comparison.\n\n### 4. **Known Names:**\n   - The names corresponding to the known face encodings are stored in a list `known_faces`. These names are used to identify people when their faces are detected.\n\n### 5. **Attendance Logging:**\n   - A CSV file is created with the current date (`data/YYYY-MM-DD.csv`) to log attendance.\n   - The program writes the names and the time of detection into the CSV file.\n\n### 6. **Face Detection and Recognition Loop:**\n   - The script continuously captures frames from the camera feed.\n   - Each frame is resized to 25% of its original size for faster face detection.\n   - The frame is converted to RGB since `face_recognition` works with RGB images.\n   - Face locations and encodings are extracted from the frame.\n   - Each detected face is compared against the known faces using `face_recognition.compare_faces()` and `face_recognition.face_distance()`. The closest match is selected.\n   - If the face matches a known person, the name is displayed on the video frame, and their attendance is logged.\n   - If the face is not recognized, it is marked as \"Unknown Person\".\n\n### 7. **Display and Exit:**\n   - The script displays the video feed in a window labeled \"Attendance System\". If a known face is detected, it displays the name along with \"Present\"; otherwise, it shows \"Unknown Person\".\n   - The loop continues until the user presses the \"q\" key, at which point the video capture is released, and the window is closed.\n\n\n### Key Features:\n- **Face Matching**: Recognizes and matches faces in real-time.\n- **Attendance Logging**: Logs the name and the time of appearance in a CSV file.\n- **Efficient Face Detection**: Uses downscaled frames to improve performance without compromising recognition accuracy.\n\n\n[ins]: ./Installation.md\n[pyn]: https://www.python.org/downloads/release/python-31011/\n[pip]: https://pypi.org/project/pip/\n[vsc]: https://code.visualstudio.com/download/\n[pyc]: https://www.jetbrains.com/pycharm/download/\n\n\n## For Installation Process\n- Refer the [Installation.md][ins] file.\n\n\n## Note\n- Use the [Python 3.10][pyn] version.\n- **Recommended Python Series** for the Execution.\n\n\n## Tools\n\n| Tools   | Version       | Check |\n|---------|---------------|-------|\n| Python  | [3.10][pyn]   | [✔]   |\n| Pip     | [latest][pip] | [✔]   |\n| VSCode  | [latest][vsc] | [✔]   |\n| PyCharm | [latest][pyc] | [✔]   |\n\n\n## Show your support\n\nGive a ⭐ if you like this repository!\n\n[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?\u0026logo=buy-me-a-coffee\u0026logoColor=black)](#)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framprasathmk%2Fautomatic-attendance-system-using-face-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framprasathmk%2Fautomatic-attendance-system-using-face-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framprasathmk%2Fautomatic-attendance-system-using-face-recognition/lists"}