FaceServer is a real-time face recognition backend powered by FastAPI, supporting both HTTP and WebSocket protocols. It includes anti-spoofing and depth verification mechanisms, making it ideal for secure identity verification systems.
git clone http://gitserver/t0667/faceserver.git
cd faceserverMake sure you have Python 3.8+ installed. Then install required packages:
pip install -r requirements.txtRun the server using the following command:
python main.pyThis will start the FastAPI server on http://0.0.0.0:8000
To integrate face recognition into your frontend:
- Connect to the WebSocket endpoint:
ws://0.0.0.0:8000/ws- Send image frames in
bytesformat. - The server will respond with an array of detected face labels:
[
{"label": "person1"},
{"label": "person2"}
]You can verify the server status by visiting:
GET http://0.0.0.0:8000/
- Real-time face detection and recognition
- WebSocket support for seamless streaming
- Modular architecture for easy extension
- Easier debugging
- Automatic registeration API
- Minimal Antispoofing techniques