{"id":26138368,"url":"https://github.com/bbs1412/smartattendancesystem","last_synced_at":"2026-04-16T15:04:46.568Z","repository":{"id":272684105,"uuid":"893202643","full_name":"Bbs1412/SmartAttendanceSystem","owner":"Bbs1412","description":"Smart Attendance System to automate the attendace calculation in lectures using Python","archived":false,"fork":false,"pushed_at":"2025-03-03T21:07:54.000Z","size":2925,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-10T07:43:39.159Z","etag":null,"topics":["attendance-monitoring","attendance-system","face-recognition","opencv","parallel-computing","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bbs1412.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-23T19:58:02.000Z","updated_at":"2025-07-30T07:08:29.000Z","dependencies_parsed_at":"2025-01-16T01:54:24.174Z","dependency_job_id":"ccaca154-c9c8-4ad8-80a8-7ae5f7ee4dfc","html_url":"https://github.com/Bbs1412/SmartAttendanceSystem","commit_stats":null,"previous_names":["bbs1412/smartattendancesystem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bbs1412/SmartAttendanceSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FSmartAttendanceSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FSmartAttendanceSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FSmartAttendanceSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FSmartAttendanceSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bbs1412","download_url":"https://codeload.github.com/Bbs1412/SmartAttendanceSystem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FSmartAttendanceSystem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31891077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T11:36:10.202Z","status":"ssl_error","status_checked_at":"2026-04-16T11:36:09.652Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-monitoring","attendance-system","face-recognition","opencv","parallel-computing","python"],"created_at":"2025-03-11T01:57:59.354Z","updated_at":"2026-04-16T15:04:46.545Z","avatar_url":"https://github.com/Bbs1412.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Attendance System\nThe Smart Attendance System automates attendance calculation during lectures using a video uploaded through a user-friendly interface. The system processes the video frames with OpenCV, identifies students using pre-trained face encodings, and calculates attendance based on a threshold of 75% frame presence. It ensures concurrency with threading and provides results in a downloadable Excel format.\n\n\n## Index:\n- [Smart Attendance System](#smart-attendance-system)\n- [Project Details](#-project-details)\n    - [Aim](#aim)\n    - [Methodology](#methodology)\n    - [Features](#features)\n    - [Tech Stack](#tech-stack)\n- [Steps to run](#-steps-to-run)\n- [Extra Measures](#ℹ️-extra-measures)\n    - [General Instructions](#general-instructions)\n    - [Folders](#folders)\n    - [Template Rendering Errors](#template-rendering-errors)\n- [Contributions](#-contributions)\n- [License](#-license)\n- [Contact](#-contact)\n\n\n## 🎯 Project Details:\n### Aim:\nTo automate attendance calculation efficiently using face recognition, ensuring accuracy and convenience for faculty and students.\n\n### Methodology:\n+ Video is pre-processed and uploaded from the frontend and sent to a Flask server.\n+ Frames are processed using OpenCV for face recognition.\n+ Captured `face Locations` are compared against pre-saved encodings using `face distance` and `face encodings` to identify individuals.\n+ Face encodings are a one-time process completed during registration of new student.\n+ Attendance is calculated based on frame presence with a threshold of 75%.\n+ Results are rendered on a webpage and made downloadable in Excel format.\n+ A distributed computing implementation of this project is here: [![Distributed Version Repository](https://img.shields.io/badge/Bbs1412/-DistributedAttendanceSystem-ff8800.svg?logo=github)](https://github.com/Bbs1412/DistributedAttendanceSystem)\n\n\n### Features:\n+ Web-based interface for ease of use.\n  ![Home Page - Dark Mode](Docs/home_dark.png)\n+ Record and Upload video for attendance processing.\n  ![Recording](Docs/recording.png)\n+ Proper asynchronous handling ensures seamless request processing and smooth UI transitions during face recognition.\n  ![Processing](Docs/processing.png)\n+ Real-time face recognition with **concurrency** using threading, **locking** for consistent read-write operations.\n+ Faster operation and time-saving due to parallel processing. \n+ Threshold-based attendance marking for customizable and accurate results.\n+ Faculty access to detailed results and downloadable attendance records.\n  ![Results](Docs/result_dark.png)\n+ Results are provided in downloadable Excel format.\n  ![Excel](Docs/excel.png)\n+ Light and Dark mode for better accessibility.\n  ![Home Page - Light Mode](Docs/home_light.png)\n  ![Results - Light Mode](Docs/result_light.png)\n\n### Tech Stack:\n+ **Backend:** Python, Flask\n+ **Frontend:** HTML, CSS, JavaScript\n+ **Libraries:** OpenCV, face_recognition, threading\n+ **Data Formats:** JSON, Excel\n+ **Tools:** Virtual environment (venv), Python's standard libraries\n\n\n## 🚀 Steps to run:\n\n1. Clone the repository:\n    ```bash\n    git clone --depth 1 https://github.com/Bbs1412/SmartAttendanceSystem\n    ```\n    \n1. Navigate to the project directory:\n    ```bash\n    cd SmartAttendanceSystem\n    ```\n\n1. Create a virtual environment:\n    ```bash\n    python -m venv venv\n    ```\n\n1. Activate the virtual environment:\n    - Windows\n        ```bash\n        venv\\Scripts\\activate\n        ```\n    - Linux\n        ```bash\n        source venv/bin/activate\n        ```\n\n1. Install the required packages:\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n1. Set the environment variables (Optional):\n    - Open the `.env` file and update the environment variables if needed or keep the default values\n\n1. Adding the images:\n    - Create a folder named `Pics` in the project directory\n        ```bash\n        mkdir Pics\n        ```\n    - Add the images of the people you want to recognize in the `Pics` folder.\n    \n1. Train the models:\n    - Open the `face_train.py` file\n    - Scroll down (~ line 73) to update the ***people*** list\n    - Add all the people you want to recognize in the ***people*** list by calling:\n        ```Python\n        Person(\n            reg='registration_number',\n            name='Name',\n            image='person_name.jpg',      # Image should be in the 'Pics' folder\n            display_name='Display Name',  # optional\n            pickle_name='person_name.pkl' # optional\n        )\n        ```\n    - Run the `face_train.py` file\n        ```bash\n        python face_train.py\n        ```\n\n1. Run the app:\n    ```bash\n    python app.py\n    ```\n\n1. Open the browser and go to the following URL (default):\n    ```URL\n    http://localhost:5000\n    ```\n\n\n## ℹ️ Extra Measures:\n\n### General Instructions:\n- If some errors occurs:\n    1. First try deleting the `__pycache__` folder\n    1. Restart the server and run the application again.\n- Using Conda for environment creation may help ease the process and might make it faster.\n\n### Folders:\n- Although the code includes conditions to dynamically check and resolve issues, if an error occurs or for re-verification, please check the following folders:\n    | Folder | Detail | Checking |\n    | --- | --- | --- |\n    | `assets/` | Should contain all the css, js, images, etc. | Cloned from repository |\n    | `Templates/` | Should contain all the html files | Cloned from repository |\n    | `Pics/` | Should contain all the images of people to be recognized | Must be done by user |\n    | `Excels/` | Empty initially | Dynamically Checked in `app.py` |\n    | `Uploads/` | Empty initially | Dynamically Checked in `image_processor.py` |\n    | `Jsons/` | Empty initially | Dynamically Checked in `face_train.py` |\n    | `Models/` | Empty initially | Dynamically Checked in `face_train.py` |\n    | `.env` | (File) Should contain all the environment variables | Cloned from repository |\n- In case you have changed the env variables, check folders accordingly\n\n### Template Rendering Errors:\n- `Templates/` might give some error on linux, check the 'T' being either capital or small\n- Or else, Set the Templates folder path in the `app.py` file manually:\n    ```Python\n    app = Flask(__name__, template_folder='Templates')\n    ```\n\n\n## 🤝 Contributions:\n   Any contributions or suggestions are welcome! \n\n\n## 📜 License: \n[![Code-License](https://img.shields.io/badge/License%20-GNU%20--%20GPL%20v3.0-blue.svg?logo=GNU)](https://www.gnu.org/licenses/gpl-3.0)\n- This project is licensed under the `GNU General Public License v3.0`\n- See the [LICENSE](LICENSE) file for details.\n- You can use the code with proper credits to the author.\n\n\n## 📧 Contact:\n- **Email -** [bhushanbsongire@gmail.com](mailto:bhushanbsongire@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbs1412%2Fsmartattendancesystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbs1412%2Fsmartattendancesystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbs1412%2Fsmartattendancesystem/lists"}