Face Recognition System Using Python & Flask

Face Recognition System Using Python & Flask

Face Recognition System Using Python & Flask

Interested in above project ,Click Below
WhatsApp
Telegram
LinkedIn

Face Recognition System Using Python & Flask

Face Recognition System is a secure and production-ready facial recognition system developed using Python and Flask, with real-time face processing and authentication. Developed by UPDATEGADH, this project is built for developers or businesses looking for a reliable biometric system for login, verification, or attendance use cases.

Whether you’re building a smart attendance tracker, a secure login portal, or an identity verification app, this project gives you a fully working foundation to start from.


📊 Project Summary

DetailInfo
Project NameFace Recognition System
Language(s) UsedPython
Backend FrameworkFlask
DatabasePostgreSQL (via SQLAlchemy ORM)
Application TypeWeb Application
DeveloperUPDATEGADH

🚀 Key Features

  • 🔐 User Registration and Secure Login — Users can register with their credentials and log in securely.
  • 📷 Live Camera Stream for Face Detection — Real-time webcam feed is used to detect and capture faces instantly.
  • 🧠 Face Encoding & Matching with OpenCV — Faces are encoded into numerical vectors and matched against stored data using OpenCV.
  • 🗃️ Upload Image for Face Recognition — Users can also upload a static image for identity verification.
  • 🧍 Individual User Face Data Storage — Each user’s face data is stored uniquely in the database for accurate matching.
  • 🛑 Logout and Session Management — Secure session handling ensures only authenticated users can access protected routes.
  • 📦 Image Upload Validation — Supports PNG, JPG, JPEG, and GIF formats with server-side validation.
See also  Best Prison Management System Project Using Python

🛠️ Technologies Used

This project uses a modern and beginner-friendly tech stack:

  • Python 3.x — Core programming language
  • Flask — Lightweight web framework for routing and handling requests
  • OpenCV — For capturing webcam feed and processing image frames
  • face_recognition library — For generating and comparing face encodings
  • PostgreSQL — Relational database to store user info and face data
  • SQLAlchemy ORM — For database interaction using Python objects
  • HTML/CSS/Bootstrap — Frontend interface for the web app

📋 Step-by-Step Setup Guide

Follow these steps to run the Face Recognition System on your local machine:

Step 1 — Clone or Download the Project
Download the source code from the link below and extract it to your desired folder.

Step 2 — Install Python & Required Libraries
Make sure Python 3.x is installed. Then open your terminal and run:

pip install flask opencv-python face_recognition sqlalchemy psycopg2

Step 3 — Set Up PostgreSQL Database
Create a new database in PostgreSQL (e.g., face_recognition_db) and update the database connection string in the config.py or app.py file:

SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@localhost/face_recognition_db'

Step 4 — Run Database Migrations
Initialize the database tables by running:

flask db init
flask db migrate
flask db upgrade

Step 5 — Start the Flask Server
Run the application with:

python app.py

Open your browser and navigate to https://updategadh.com:5000 to access the app.

Step 6 — Register a New User
Go to the registration page, fill in your details, and allow camera access. The system will capture your face and store the encoding in the database.

See also  Liver Cirrhosis Stage Prediction Using Machine Learning | Web App

Step 7 — Login Using Face Recognition
On the login page, click “Start Camera.” The system will detect your face in real time and match it against stored encodings. If matched, you will be logged in automatically.


📂 Project Folder Structure

face-recognition-flask/
│
├── app.py                  # Main Flask application
├── config.py               # Configuration settings
├── models.py               # Database models (SQLAlchemy)
├── templates/              # HTML templates
│   ├── index.html
│   ├── register.html
│   └── login.html
├── static/                 # CSS, JS, uploaded images
├── uploads/                # Stored face images
└── requirements.txt        # All dependencies

❓ Frequently Asked Questions (FAQs)

Q1. What is a Face Recognition System?
A Face Recognition System is a biometric technology that identifies or verifies a person’s identity using their facial features. It captures an image or video frame, detects the face, and matches it against a stored database of known faces.

Q2. Which library is used for face recognition in Python?
This project uses the face_recognition library, which is built on top of dlib and uses deep learning models to generate highly accurate 128-dimensional face encodings for comparison.


🔽 Download the Source Code

Click the button below to download the complete source code for the Face Recognition System Using Python & Flask project, including all files, templates, and a setup guide.

👉 Download Now

🎓 Need Complete Final Year Project?

Get Source Code + Report + PPT + Viva Questions (Instant Access)

🛒 Visit UpdateGadh Store →
💬 Chat Now