Face Recognition Access Control System based on the characteristics of students going to and coming from class.
This project is developed using Python, with a front-end developed using PySide6 and a back-end using the Flask framework. The database used is PostgreSQL.
The project file structure is as follows:
├── Client
│ ├── form.ui
│ ├── Gate.py
│ ├── main.py
│ ├── QueryRecord.py
│ ├── record.ui
│ ├── requirements.txt
│ ├── ui_form.py
│ └── ui_record.py
├── Server
| ├── _init_paths.py
│ ├── FacenetModel.py
│ ├── ImgServer.py
│ └── requirements.txt
├── SQL
│ ├── __init__.py
│ ├── ConnectionPool.py
│ ├── Create.sql
│ ├── InsertProcessor.py
│ └── QueryProcessor.py
├── ERdiagram.excalidraw
├── LICENSE
├── README.md
└── _timeit.py
-
Uses face recognition technology (MTCNN and FaceNet) to verify identity
-
Records information about people entering and exiting doors, including the time, location, and direction of entry/exit
-
Maintains a database of personnel information, including student, teacher, and staff information
-
Maintains a database of face images for use in face recognition
-
Maintains a log of face recognition results, recording the time and result of each recognition
Installation of this system is divided into two parts: the front-end client and the back-end server.
- Download and unzip the source code for this project, and navigate to the
Client
directory. - Install dependencies: run
pip install -r requirements.txt
. - Run the client: in the Client directory, run
python main.py
to start the client.
- Download and unzip the source code for this project, and navigate to the
Server
directory. - Install dependencies: run
pip install -r requirements.txt
. (ps. If you want to use CUDA to accelerate the model, you need to install the corresponding version of PyTorch and Torchvision. https://pytorch.org/get-started/locally/) - Install PostgreSQL and create a database with the file
Create.sql
. - Run the server: in the Server directory, run
python ImgServer.py
to start the server.
This system uses a PostgreSQL database, with the following tables:
- Faculty (FacultyName, FacultyID)
- Major (MajorName, MajorID, FacultyID)
- Class (ClassID, MajorID)
- Person (ID, Name, Gender, Age, Phone, PersonType)
- Student (ID, FacultyID, MajorID, ClassID)
- Teacher (ID, FacultyID, Position)
- Worker (ID, Type)
- Record (ID, Time, DoorID, Direction, Data, Result)
- Door (DoorID, DoorLocate)
- FaceImage (ID, Data, Feature Vector)