https://github.com/anandsundaramoorthysa/machine-learning-python-codes
Face Recognition Projects: A collection of two face recognition implementations, featuring a video-based face recognition system and a real-time webcam-based solution. This repository includes detailed setup and usage instructions for easy integration and testing.
https://github.com/anandsundaramoorthysa/machine-learning-python-codes
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Repository
Face Recognition Projects: A collection of two face recognition implementations, featuring a video-based face recognition system and a real-time webcam-based solution. This repository includes detailed setup and usage instructions for easy integration and testing.
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Machine Learning Python Codes
Welcome to the Machine Learning Python Codes. This repository contains varieties of Machine Learning dependent Python Codes.
Table of Contents
- Face Recognition from Uploaded Video
- Live Face Recognition via Webcam
- Sign Language Digit Recognition via Webcam
- Head Movement Detection Project
- Contributing
- License
- Contact
Face Recognition from Uploaded Video
About
This project processes uploaded video files, identifying and tracking faces using pre-trained models. Each frame is analyzed to detect faces, which are then matched against a known database.
Requirements
You'll need: - Google Colab for running the project. - Python 3.6+ as your environment.
Installation
Clone the repository:
bash git clone https://github.com/a1n13a1n13d4/Machine-Learning-Python-Codes.git cd Machine-Learning-Python-CodesOpen in Google Colab:
- Upload the repository to your Google Drive.
- Open the
Face_Recognition_From_Upload_Videonotebook in Google Colab.
Install dependencies:
python !pip install numpy opencv-python dlib face_recognition imutils
Usage
- Upload your video file to Google Drive.
- Update the script:
- Modify
video_pathin the script to point to your uploaded video.
- Modify
- Run the script:
- Process the video, and the output will be saved in the specified directory.
Results
The processed video with recognized faces will be saved to your Google Drive, along with a log file detailing detected faces and matches.
Live Face Recognition via Webcam
About
This project provides real-time face recognition via webcam, detecting and identifying faces against a pre-trained model.
Requirements
You'll need: - Anaconda Navigator to manage dependencies. - Python 3.6+ as your environment.
Installation
Clone the repository:
bash git clone https://github.com/a1n13a1n13d4/Machine-Learning-Python-Codes.git cd Machine-Learning-Python-CodesCreate and activate a new Anaconda environment:
bash conda create -n face_recognition_env python=3.6 conda activate face_recognition_envNavigate to the webcam project directory:
bash cd Live_Face_Recognition_Via_WebcamInstall dependencies:
bash pip install numpy opencv-python dlib face_recognition imutils
Usage
- Ensure your webcam is properly set up.
- Run the following command in the terminal:
bash python live_face_recognition.py
The webcam feed will show real-time face detection and recognition.
Results
The results are displayed live and logged to a file for future reference.
Sign Language Digit Recognition via Webcam
About
This project provides real-time sign language digit recognition via a webcam. It generates a random 5-digit number and prompts the user to sign each digit sequentially. The system verifies if the signed digits match the generated number and provides feedback on the accuracy.
Requirements
You'll need:
- A Python 3.9.13
- A virtual environment manager (recommended:
venv).
Installation
- Clone the Repository
bash
git clone https://github.com/a1n13a1n13d4/Machine-Learning-Python-Codes.git
cd Machine-Learning-Python-Codes
- Create and Activate a Virtual Environment
bash
python -m venv envir
On Windows:
bash envir\Scripts\activateOn macOS/Linux:
bash source envir/bin/activate
- Install Dependencies
bash
pip install mediapipe==0.9.1 opencv-python==4.7.0.72 numpy==1.21.4
Usage
- Ensure Your Webcam is Properly Set Up
Make sure your webcam is connected and operational.
- Run the Script
bash
python Sign_Detection.py
- How It Works
- The script generates a random 5-digit number consisting of digits 1-5.
- For each digit, the script displays the digit to be signed and waits for the user to sign it.
- The system uses MediaPipe to detect and recognize hand gestures.
- The detected gestures are checked against the expected digits, and feedback is provided.
- Stopping the Program
- To stop the program at any time, press the 'q' key while the video window is open.
Results
- Real-Time Feedback: The system provides live feedback on whether the signed digits match the generated number.
- Logging: Results are displayed on the terminal and can be customized to log to a file if needed.
Troubleshooting
No Video Feed:
- Ensure your webcam is properly connected and accessible.
- Check if other applications are using the webcam.
Import Errors:
- Verify that all required packages are installed in the virtual environment.
Gesture Recognition Not Accurate:
- Update the
detect_gesture()function with more accurate gesture recognition logic using MediaPipe landmarks.
- Update the
Head Movement Detection Project
About
This project uses a real-time video feed to detect and analyze head movements. It prompts users to move their heads in specific directions (up, down, left, right) and evaluates if the movements match the given prompt. The system uses pre-trained dlib models to detect faces and landmarks, and provides visual feedback based on detected movements.
Requirements
You'll need:
- Python 3.9+ as your environment.
- OpenCV, dlib, numpy, and imutils libraries.
- A pre-trained dlib model for face landmarks (
shape_predictor_68_face_landmarks.dat).
Installation
Clone the repository:
bash git clone https://github.com/a1n13a1n13d4/Machine-Learning-Python-Codes.git cd Machine-Learning-Python-CodesCreate and activate a virtual environment:
bash python -m venv envir source envir/bin/activate # On Windows use `envir\Scripts\activate`Install the required packages:
bash pip install opencv-python==4.5.5.64 dlib==19.22.1 imutils==0.5.4 face_recognition==1.3.0 numpyDownload the dlib shape predictor model:
Download the
shape_predictor_68_face_landmarks.datfile from the dlib model repository. Extract the file and place it in the project directory.
Usage
Run the script:
Ensure your webcam is connected and working. Execute the script to start head movement detection:
bash python Head_Movement.pyInteract with the prompts:
The script will display prompts to move your head in different directions. Follow the instructions and see if your movements match the given prompt. The video feed will show visual feedback with green or red boxes based on your movements.
Results
The processed video feed will be displayed in a window. No output files are saved; instead, the feedback is shown in real-time.
Guidelines
- Code Style: Ensure your code adheres to the project’s coding style and conventions.
- Documentation: Include appropriate comments and documentation for your changes, especially if introducing new features or modifying existing ones.
- Testing: Write unit tests for any new functionality, and ensure that all existing tests pass before submitting your pull request.
Contributing
We welcome contributions to improve these face recognition projects. Please follow the guidelines below for submitting your changes.
How to Contribute
- Fork and clone the repository.
- Create a new branch for your changes.
- Implement and test your changes.
- Submit a pull request with a detailed description.
Thank you for your interest in contributing!
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contact
For inquiries or suggestions, feel free to reach out:
Anand Sundaramoorthy
Email: sanand03072005@gmail.com
LinkedIn: Anand Sundaramoorthy
Owner
- Name: ANAND SUNDARAMOORTHY SA
- Login: anandsundaramoorthysa
- Kind: user
- Location: Madurai, Tamilnadu
- Repositories: 1
- Profile: https://github.com/anandsundaramoorthysa
LCM'25 | Tech Enthusiast | Front-End Developer | Blog Writer | Java Full Stack Learner