{"id":19503873,"url":"https://github.com/rajanmandanka07/face-recognition","last_synced_at":"2026-03-11T19:03:44.901Z","repository":{"id":254999791,"uuid":"848221171","full_name":"rajanmandanka07/Face-Recognition","owner":"rajanmandanka07","description":"This Face Recognition System allows adding new faces, training a classifier, and real-time face recognition using a webcam. Built with Python and OpenCV.","archived":false,"fork":false,"pushed_at":"2024-08-28T07:42:57.000Z","size":786,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-10T22:28:51.345Z","etag":null,"topics":["classifier-training","face-recognition","haar-cascade-classifier","image-processing","lbph-face-recognizer","numpy","opencv-python","pillow"],"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/rajanmandanka07.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-27T11:11:05.000Z","updated_at":"2024-10-12T07:44:01.000Z","dependencies_parsed_at":"2024-11-10T22:24:33.097Z","dependency_job_id":"8d446823-8a34-417a-a98f-7168a36cd4d7","html_url":"https://github.com/rajanmandanka07/Face-Recognition","commit_stats":null,"previous_names":["rajanmandanka07/face-recognition"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajanmandanka07%2FFace-Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajanmandanka07%2FFace-Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajanmandanka07%2FFace-Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajanmandanka07%2FFace-Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajanmandanka07","download_url":"https://codeload.github.com/rajanmandanka07/Face-Recognition/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233014640,"owners_count":18611671,"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":["classifier-training","face-recognition","haar-cascade-classifier","image-processing","lbph-face-recognizer","numpy","opencv-python","pillow"],"created_at":"2024-11-10T22:23:22.398Z","updated_at":"2026-03-11T19:03:39.853Z","avatar_url":"https://github.com/rajanmandanka07.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Recognition System\n\nThis project is a Face Recognition System that allows users to add new faces to a dataset, train a classifier on the dataset, and recognize faces using a pre-trained classifier. It consists of three main Python scripts:\n\n1. `main.py` - The entry point for the system, providing a menu for adding new users, training the classifier, and recognizing faces.\n2. `dataset_generator.py` - Handles dataset generation by capturing images from the webcam, preprocessing them, and saving them for training.\n3. `face_recognizer.py` - Recognizes faces using the trained classifier and displays the recognized name and confidence level on the screen.\n\n## Features\n\n- **Add New User**: Capture images of a new user, add their details (name and ID) to the dataset, and update the classifier.\n- **Train Classifier**: Automatically trains the classifier on the new dataset.\n- **Recognize Face**: Uses the webcam to detect and recognize faces in real-time, displaying the recognized name on the screen.\n\n## Requirements\n\n- Python\n- OpenCV\n- NumPy\n- PIL (Pillow)\n\n## Setup and Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/yourusername/facerecognition.git\n   cd facerecognition\n2. **Install the required Python packages**: \n    ```bash\n    pip install opencv-contrib-python numpy pillow\n3. **Download the Haar Cascade XML file for face detection**:\n    - You can download the haarcascade_frontalface_default.xml file from the OpenCv GitHub repository.\n    - Place the file in the root directory of the project.\n4. **Run the program**:\n    ```bash\n    python main.py\n\n## Project Structure\n\n- `main.py`: The main script that provides a command-line interface for adding new users, training the classifier, and recognizing faces.\n- `dataset_generator.py`: Handles the dataset generation and training of the classifier.\n- `face_recognizer.py`: Performs real-time face recognition using the webcam.\n- `user_data.json`: A JSON file that stores user data (name and ID) for recognition purposes.\n- `classifier.xml`: The trained classifier file used for face recognition.\n\n## Usage\n\n1. **Add New User**:\n   - Run the script using `python main.py`.\n   - Choose option `1` to add a new user.\n   - Enter the name and ID of the user.\n   - The system will guide you through capturing 30 images of the user's face. Follow the on-screen instructions.\n   - The images will be saved, and the classifier will be trained automatically.\n\n2. **Recognize Face**:\n   - Run the script using `python main.py`.\n   - Choose option `2` to recognize a face.\n   - The system will use the webcam to detect and recognize faces in real-time, displaying the name and confidence level on the screen.\n\n3. **Exit**:\n   - Choose option `3` to exit the program.\n\n## JSON Data Storage\n\n- The user data (name and ID) is stored in a `user_data.json` file as key-value pairs. The key is the ID, and the value is the name of the user.\n\n## Important Notes\n\n- Ensure that your webcam is connected and working properly before running the program.\n- The system requires good lighting conditions to perform accurate face recognition.\n- The confidence level of recognition depends on the quality and number of images in the dataset.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Author\n\n- [Rajankumar Mandanka](https://github.com/rajanmandanka07/Face-Recognition.git)\n\n## Acknowledgments\n\n- This project uses the OpenCV library for face detection and recognition.\n- The Haar Cascade classifier used in this project is provided by OpenCV.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajanmandanka07%2Fface-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajanmandanka07%2Fface-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajanmandanka07%2Fface-recognition/lists"}