FaceMatch is a Flask web application that verifies a person's identity by comparing their selfie with a document image. It uses the face_recognition library for facial recognition and verification.
- Upload a document image (e.g., ID, passport) and a selfie image.
- Verify if the face in the document matches the face in the selfie.
- Store uploaded images in a unique folder for each verification session.
- Python 3.x
- Flask
- face_recognition
- face_recognition_models
- Werkzeug
-
Clone the repository:
git clone https://github.com/Mk-1000/FaceMatch.git cd FaceMatch -
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
-
On macOS and Linux:
source venv/bin/activate -
On Windows:
venv\Scripts\activate
-
-
Install the required packages:
pip install --upgrade setuptools pip install Flask pip install face_recognition pip install git+https://github.com/ageitgey/face_recognition_models
-
Run the Flask application:
flask run
or
python app.py
-
Send a POST request to
/uploadwith the following form data:documentImage: The document image file.selfieImage: The selfie image file.
You can use a tool like Postman or cURL for testing.
curl -X POST http://127.0.0.1:5000/upload \
-F 'documentImage=@/path/to/document_image.jpg' \
-F 'selfieImage=@/path/to/selfie_image.jpg'This project is licensed under the MIT License. See the LICENSE file for details.
- face_recognition - For the facial recognition capabilities.
- Flask - For the web framework.