A real-time face verification system that compares faces from ID cards with live camera feed using advanced face recognition technology.
- Real-time Face Recognition: Live camera feed with instant face matching
- ID Card Processing: Upload and extract faces from ID cards or photos
- High Accuracy: Uses InsightFace's ArcFace Buffalo model for precise face embeddings
- User-friendly Interface: Clean Streamlit web interface
- Similarity Scoring: Shows confidence scores for face matches
- Instant Feedback: Visual indicators (green for match, red for no match)
- InsightFace: State-of-the-art face recognition and analysis
- OpenCV: Computer vision and image processing
- Streamlit: Web application framework
- StreamLit-WebRTC: Real-time video streaming
- SciPy: Distance calculations for face similarity
- NumPy: Numerical operations
-
Clone the repository:
git clone https://github.com/Vjay15/Face_Check.git cd Face_Check -
Install required dependencies:
pip install -r requirements.txt
-
Start the application:
streamlit run app.py
-
Upload ID Card:
- Click "Upload your ID Card" in the left panel
- Select a JPG, JPEG, or PNG file containing a clear face
- The system will automatically extract and display the face
-
Live Verification:
- Once an ID is uploaded, the face will be extracted and click on start, to start the camera feed
- Position your face in front of the camera
- The system will show real-time similarity scores
- Green box = Match found
- Red box = No match
- Face Extraction: Uses OpenCV's CascadeClassifier and HaarCascade Algorithm to detect and extract faces
- Face Detection: Uses InsightFace's Buffalo model to detect faces in uploaded images
- Feature Extraction: Generates normalized face embeddings for comparison
- Real-time Processing: Continuously processes camera frames for face detection
- Similarity Calculation: Uses cosine distance to measure face similarity
- Threshold Matching: Considers faces with >60% similarity as matches
- Similarity Threshold: Currently set to 0.6 (60% similarity)
- Camera Resolution: 720x200 pixels output for optimal performance
- Processing: Configured for GPU acceleration (falls back to CPU)
- Input Images: JPG, JPEG, PNG
- Camera: Any webcam compatible with WebRTC
- Python 3.7+
- Webcam/Camera access
- Modern web browser with WebRTC support
This project is open source and available under the MIT License.
- InsightFace team for the excellent, compact and highly efficient face recognition models
- OpenCV community for computer vision tools
- Countless Medium articles and Blogs of people that taught me how these algorithms worked!

