Enterprise-grade biometric authentication system with AI-powered liveness detection and anti-spoofing protection.
NOVA-SHIELD is an AI-powered biometric authentication system designed to distinguish between real human faces and spoof attacks such as:
- Printed photos
- Mobile screen attacks
- Replay videos
- Static face images
The system combines facial recognition, computer vision, and liveness detection to provide secure authentication for:
- Banking systems
- Secure dashboards
- Identity verification
- Access control systems
| Module | Capabilities |
|---|---|
| Face Recognition | Real-time face matching, Multiple face detection, High-accuracy recognition |
| Anti-Spoofing | Blink detection, Motion tracking, Reflection analysis, FFT texture detection |
| Liveness Detection | EAR calculation, Natural movement verification, Screen/photo rejection |
| Banking Dashboard | Account display, Transactions, Secure authentication |
| Security Layer | Session validation, Real-time verification, Spoof logging |
| Interface | Glassmorphism UI, Responsive design, Professional layout |
| Layer | Technology |
|---|---|
| Backend | Flask (Python) |
| Face Recognition | face_recognition, dlib |
| Computer Vision | OpenCV |
| Anti-Spoofing | FFT Analysis, EAR Detection |
| Frontend | HTML5, CSS3, JavaScript |
| Styling | Google Fonts (Inter) |
| Component | Requirement |
|---|---|
| Webcam | Built-in or USB webcam |
| RAM | 2GB minimum (4GB recommended) |
| Storage | 1GB free disk space |
| CPU | Dual-core processor (2015+) |
| Software | Requirement |
|---|---|
| Python | Version 3.8 or higher |
| Operating System | Linux (Ubuntu/Debian/Mint), macOS, Windows (WSL2 recommended) |
| Camera Drivers | Installed and working |
The following packages are automatically installed during setup:
| Package | Purpose |
|---|---|
opencv-python |
Camera access and computer vision |
face-recognition |
Face detection and encoding |
numpy |
Numerical calculations |
flask |
Web server backend |
scipy |
Anti-spoofing calculations |
git clone https://github.com/David-Kimath1/nova-shield.git
cd nova-shieldpython3 -m venv venv
source venv/bin/activatevenv\Scripts\activatepip install --upgrade pip
pip install opencv-python face-recognition flask numpy scipypython3 register_first_face.py- Enter username
- Look at the camera
- Press
SPACEto capture - Press
ESCto finish
python3 liveness_shield.pyhttp://localhost:8080| Indicator | Meaning |
|---|---|
| LIVE | Real human face detected |
| SPOOF | Photo/video attack detected |
| DENIED | Verification failed |
- Face matched successfully
- Liveness score calculated
- Secure session created
- Dashboard unlocked
The system automatically blocks:
- Printed photos
- Phone replay attacks
- Video playback attacks
- Static face images
Spoof attempts are logged in real time.
The integrated banking demo includes:
- Account holder information
- Current balance display
- Transaction history
- Session verification
- Real-time identity validation
User sessions remain active only while the verified face is present.
Camera Input
│
▼
Face Detection
│
▼
Liveness Analysis ───────► Spoof Detection ───────► Reject
│ │
▼ ▼
Face Recognition Photo/Video Alert
│
▼
Authentication
│
▼
Secure Session
- Detects natural blinking patterns
- Rejects static image attacks
- Improves live verification accuracy
- Tracks natural face movement
- Detects frozen/static attacks
- Enhances spoof detection reliability
- Detects monitor artifacts
- Identifies screen moire patterns
- Detects printed texture inconsistencies
- Detects glare from screens
- Identifies unnatural reflections
- Helps block replay attacks
| Test Case | Result |
|---|---|
| Real face with blinking | GRANTED |
| Printed photo | REJECTED |
| Mobile screen replay | REJECTED |
| Video playback attack | REJECTED |
| Registered user with glasses | GRANTED |
python3 register_first_face.pyUse a unique username for each user.
Modify:
storage/bank_data.jsonExample configuration:
{
"name": "JOHN DOE",
"account_number": "98-765-4321",
"balance": 25000.00,
"currency": "USD",
"transactions": [
{
"date": "2024-01-15",
"desc": "Deposit",
"amount": "+1000",
"type": "credit"
},
{
"date": "2024-01-14",
"desc": "Payment",
"amount": "-50",
"type": "debit"
}
]
}ls /dev/video*
sudo chmod 666 /dev/video0pip uninstall face_recognition dlib -y
pip install dlib
pip install face_recognition --no-cache-dirpython3 -c "import json; print(json.load(open('storage/bank_data.json')))"mkdir -p storagecat > storage/bank_data.json << 'EOF'
{
"name": "YOUR NAME",
"account_number": "01-234-5678",
"balance": 10000.00,
"currency": "KES",
"transactions": []
}
EOFlsof -ti:8080 | xargs kill -9| Component | Performance |
|---|---|
| CPU Face Detection | 15–20 FPS |
| Face Encoding | 5–10 FPS |
| Liveness Detection | 20–30 FPS |
| Average Latency | 30–70ms |
- Voice + Face multi-factor authentication
- Remote device locking
- Mobile companion application
- Cloud dashboard integration
- Encrypted biometric storage
- Federated learning
- Edge AI optimization
- Multi-camera support
git checkout -b feature/AmazingFeaturegit commit -m "Add AmazingFeature"git push origin feature/AmazingFeatureSubmit your pull request for review.
Distributed under the MIT License.
See LICENSE for more information.
| Platform | Link |
|---|---|
| GitHub | https://github.com/David-Kimath1 |
face_recognitionby Adam Geitgeydlibby Davis King- OpenCV Community
- Flask Framework