
A Django login system that won't let anyone in with just a password, or a photo held up to the webcam. Face match, blink-and-turn liveness check, adaptive OTP, plus FAR/FRR evaluation your examiner will actually respect.
Python | Django 5 | OpenCV | face_recognition (dlib) | MediaPipe | pyotp | Django REST Framework | SimpleJWT | PostgreSQL | SQLite | Bootstrap 5 | Chart.js | Docker
Passwords get phished. Basic face login gets fooled by a printed photo. This final year project fixes both problems by stacking three checks on top of each other: something you know (a password), something you are (your face), and something you have (a one-time password). And the face check isn't the lazy kind. After your face matches, the system throws a random liveness challenge at you, like blink twice or turn your head left, so a photo or a replayed video simply can't get through.
During enrollment, TriGuard Auth captures five or more webcam frames from different angles and stores only their 128-dimensional face embeddings, encrypted with Fernet. The actual face images are never saved. At login, a risk engine checks your device, IP address and time of day, and if everything looks normal it skips the OTP step. If something looks off, you get the full three-factor treatment.
The project also ships with an evaluation command that calculates False Acceptance Rate (FAR), False Rejection Rate (FRR), accuracy and a confusion matrix on a labelled dataset. So when your guide asks "why did you choose 0.55 as the threshold?", you have a graph to show instead of a shrug.
Picture a normal login page. You type your email and password. Then, instead of landing on the dashboard, your webcam turns on.
The system compares your face with the encrypted embeddings it stored when you registered. If it's a match, a prompt appears: "Blink twice" or "Smile" or "Turn right". You've got 15 seconds. MediaPipe Face Mesh tracks 468 points on your face and checks whether your eyes actually closed (using the Eye Aspect Ratio) or your head actually turned. A photo can't blink. That's the whole trick, and it works.
After that, depending on how risky the login looks, you either go straight in or get an OTP by email, SMS, or Google Authenticator. Every attempt, successful or not, goes into an audit log. Fail the face match too many times and the system quietly snaps a picture of whoever is sitting there and emails it to the real account owner.
face_recognition (dlib), encrypted at rest via common/crypto.pyFACE_MATCH_THRESHOLD in .env, no code changes neededpyotp and qrcodedjango-ratelimit guarding the login endpointAuditLog model recording every login step.env/admin-dashboard/ with Chart.js graphs for logins per day, success vs failure, spoof attempts blocked, locked accounts, and an intruder photo gallery/api/register/, /api/face/enroll/, /api/face/verify/, /api/otp/send/, /api/otp/verify/simplejwtThis is the section most students skip, and it's exactly what separates a demo from a proper final year project. Drop images into dataset/genuine/, dataset/impostor/ and dataset/spoof/, then run python manage.py evaluate --threshold 0.55. You'll get accuracy, FAR, FRR, a confusion matrix, and a FAR/FRR-vs-threshold plot saved in the reports/ folder. Paste that graph into your report's results chapter. Done.
Python 3.11 and Django 5 on the backend. OpenCV, face_recognition (dlib) and MediaPipe for the vision work. pyotp and qrcode for TOTP. SQLite for local development, PostgreSQL for production, with a Docker Compose setup included. Bootstrap 5 and Chart.js on the frontend, Django REST Framework for the API. The code is split into clean apps: accounts, face_auth, liveness, otp, audit, dashboard and api. Your examiner will be able to follow it, which matters more than people think.
Here's the thing. Installing dlib on Windows is annoying. It wants a C++ compiler, and the first attempt often fails with a wall of red text. We've documented the workaround (pip install dlib-bin gives you a prebuilt wheel with no compiling), but budget an extra 20 minutes for it.
But the rest is easier than it looks. You don't even need to configure a real email account to test OTPs, because one line in .env switches Django to the console email backend and the codes print straight into your terminal. And the test suite runs with pytest even before the computer vision libraries are installed, since the tests that need them just skip themselves.
If you're a student who needs a working project for your college submission, final-year project, semester project, internship, or academic demonstration, this is for you. Whether you're studying BCA, B.Tech, MCA, M.Tech, Computer Science, IT, AI, Data Science, or another related field, you can choose a project that fits your requirements. If you need the source code, project report, documentation, or help setting up and running the project, CodeAj gives you the resources and support to get started faster.
It's a particularly good pick if your specialization leans toward cyber security or computer vision, since it touches both. Mixing domains like this usually impresses external examiners.
You get the complete source code, every app, template, migration and management command, plus the Mermaid architecture, login-flow and ER diagrams in the docs/ folder. The project report is written to match what the code actually does, so you won't be defending chapters that describe features that don't exist. And if the webcam won't open or dlib refuses to install, our setup support team will get on a call and sort it out with you. Want more options before you decide? Browse our Python final year projects, check out other Django projects with source code, or look at more computer vision final year projects if face tech is your thing.
Add any of these professional upgrades to save time and impress your evaluators.
Personal session with an expert developer
We'll install and configure the project on your PC via remote session (Google Meet, Zoom, or AnyDesk).
1-hour live session to explain logic, flow, database design, and key features.
Want to know exactly how the setup works? Review our detailed step-by-step process before scheduling your session.
Fully customized to match your college format, guidelines, and submission standards.
Need feature changes, UI updates, or new features added?
Charges vary based on complexity.
We'll review your request and provide a clear quote before starting work.
Reviews