An open API service indexing awesome lists of open source software.

https://github.com/adityabichhave/facial-reaction-password

AI-powered facial reaction authentication system using MediaPipe + DTW + Anti-Spoofing.
https://github.com/adityabichhave/facial-reaction-password

ai-authentication anti-spoofing biometric-authentication cybersecurity dtw facial-recognition mediapipe react

Last synced: about 2 months ago
JSON representation

AI-powered facial reaction authentication system using MediaPipe + DTW + Anti-Spoofing.

Awesome Lists containing this project

README

          



🧠 Facial Reaction Password (FRP)

A next-generation biometric authentication system that identifies users using facial micro-reactions, blinking behavior, and natural movement patterns.

Unlike traditional passwords or face-recognition systems, FRP records your reaction sequence (blink β†’ smile β†’ slight head movement, etc.) and uses AI to verify it.
It works using any standard webcam β€” no specialized hardware needed.

πŸš€ Features
πŸ”Ή Real-Time Facial Landmark Tracking

Powered by MediaPipe Face Landmarker, detecting 468+ facial points with high precision and low latency.

πŸ”Ή Reaction-Based Password (Instead of Text Passwords)

Users perform a natural facial sequence which becomes the unique password template.

πŸ”Ή AI Matching Using Dynamic Time Warping (DTW)

DTW compares two sets of motion-based landmark sequences to determine user identity.

πŸ”Ή Anti-Spoofing System

Detects and blocks fake login attempts using:

Motion variance

Blink detection

Micro-movement consistency

Landmark noise analysis

πŸ”Ή Secure Local Storage

User facial templates are stored as numerical vectors, not images.
Supports:

LocalStorage (frontend-only mode)

Express backend storage (optional)

πŸ”Ή Beautiful VisionOS-Inspired UI

Premium holographic design featuring:

Floating glass panels

Sleek motion indicators

Real-time metrics

Minimalistic control panel

πŸ› οΈ Tech Stack
Frontend

React (Vite)

TailwindCSS

MediaPipe Tasks Vision

Canvas API

Backend

Node.js + Express

Local JSON template storage
(Upgradable to MongoDB / Firebase easily)

Other Tools

Dynamic Time Warping (DTW)

LocalStorage caching

Web Share API

πŸ“Έ Demo Preview

Replace screenshot.png with your actual screenshot

![FRP Screenshot](./screenshot.png)

πŸ“¦ Folder Structure
facial-reaction-password/
β”‚
β”œβ”€β”€ backend/
β”‚ β”œβ”€β”€ server.js
β”‚ β”œβ”€β”€ package.json
β”‚
β”œβ”€β”€ frontend/
β”‚ β”œβ”€β”€ public/
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”‚ β”œβ”€β”€ FacialReactionPassword.jsx
β”‚ β”‚ β”‚ β”œβ”€β”€ FacialReactionPasswordVision.jsx
β”‚ β”‚ β”œβ”€β”€ App.jsx
β”‚ β”‚ β”œβ”€β”€ main.jsx
β”‚ β”œβ”€β”€ package.json
β”‚
β”œβ”€β”€ README.md
└── .gitignore

βš™οΈ Installation & Setup
1️⃣ Clone Repository
git clone https://github.com/adityabichhave/facial-reaction-password.git
cd facial-reaction-password

🎨 Frontend Setup (React + Vite)
cd frontend
npm install
npm run dev

Frontend starts at:
πŸ‘‰ http://localhost:5173

🧩 Backend Setup (Node.js + Express)
cd backend
npm install
npm run dev

Backend runs at:
πŸ‘‰ http://localhost:5001

πŸ” How Authentication Works

FRP records 468+ facial landmarks across multiple frames

Normalizes vectors around the face center

Creates a unique reaction pattern

Runs DTW to compare sequences

Applies anti-spoofing checks

Computes similarity score

Accepts or rejects login based on threshold

πŸ§ͺ API Endpoints (Backend Optional)
POST /api/enroll

Stores a user’s facial reaction template.

GET /api/template/:username

Retrieves stored template for login matching.

πŸ”’ Security Notes

βœ” No raw video or images are stored
βœ” Templates contain only floating-point vectors
βœ” Works completely offline
βœ” Users control their own data
βœ” Backend storage is optional

🌍 Real-World Applications

Passwordless authentication

Secure workstation login

High-security lab access

Personal computer unlocking

Research in biometrics & AI

Gesture-based UI systems

Human-computer interaction studies

🀝 Contributing

Pull requests are welcome!
Open issues for:

UI/UX improvements

Performance tuning

Model optimization

Security enhancements

πŸ“œ License

This project is licensed under the MIT License β€” free to use and modify.

πŸ‘¨β€πŸ’» Developed By
Aditya Kumar Bichhave

B.Tech CSE | Cyber Security Enthusiast | Full-Stack Developer