This is a comprehensive face recognition system built with Django and various AI technologies. The system provides robust face detection, feature extraction, and face matching capabilities through both RESTful APIs and a web interface.
- Face Library Management: Register, update, query, and delete face information
- Face Detection: Detect faces in images and extract the largest face by default
- Feature Extraction: Extract 512-dimensional face feature vectors
- 1:1 Face Verification: Compare two faces for similarity
- 1:N Face Identification: Match a face against the entire database
- Similar Face Search: Find similar faces in the database (top-5 results)
- Web Management Interface: Visual interface for face library management
- Python 3.7+
- GPU support (for optimal performance)
- CUDA compatible environment (for GPU acceleration)
git clone https://github.com/senthree3/faceRecognition.git
cd faceRecognitionpython -m venv venv
# On Windows
venv\Scripts\activate
# On Unix or MacOS
source venv/bin/activatepip install -r requirements.txt# For CUDA 11.x
pip install torch==2.0.0+cu117 torchvision==0.15.0+cu117 torchaudio==2.0.0 --index-url https://download.pytorch.org/whl/cu117# Download the AI models package
# Download the required AI models file (aiModels.zip) from:
wegt https://drive.google.com/file/d/1w2eQzqurwTwB-5yoonRFGXb4YbHZCscc/view?usp=sharing
# Extract the model files
# Extract the downloaded aiModels.zip file to the faceRecognition directory
unzip aiModels.zip -d /path/to/project/faceRecognition/python manage.py migrate
python manage.py createsuperuserpython manage.py runserverConfigure the Django settings in faceRecognition/settings.py to match your environment. You may need to adjust
database settings, static files, and security settings.
The system includes a web interface for face library management. Access it through:
http://{IP}:{PORT}/admin/
The system provides RESTful APIs for face recognition operations. All API endpoints use standardized request and response formats with encryption and authentication mechanisms.
http://{IP}:{PORT}/ai/openAbility/v1/
All API requests require authentication via:
access_key: Access key identifiersecret_key: Secret key for encryption and signingtime_stamp: Unix timestamp (milliseconds)request_id: UUID4 stringsign: MD5 signaturedata: AES-encrypted request data
access_keyandsecret_keyobtain from Web Management
- Register Face:
/faceReg - Delete Face:
/faceRegDelete - Update Face:
/faceReg(with existing face_id) - Query Face by ID:
/faceRegIDQuery - Query Faces with Pagination:
/faceRegQuery
- Face Detection:
/faceDet - Feature Extraction:
/faceFeatureExtraction - 1:1 Face Verification:
/faceVerify - 1:1 Face Verification Against DB:
/faceVerifyDB - 1:N Face Identification:
/face1N - Similar Face Search:
/faceSimilarRetrieval
For detailed API usage examples, parameter specifications, and response formats, please refer to the API Documentation included in the project.
- Keep your
access_keyandsecret_keyconfidential - Use HTTPS in production
- Implement proper authentication and authorization
- Consider data privacy regulations when storing face data
For technical support or inquiries:
- Email-1: senthree30@gmail.com
- Email-2: 717192305@qq.com
- GitHub Issues: https://github.com/senthree3/faceRecognition/issues
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- This project uses various libraries including Django, OpenCV, FAISS, ONNX Runtime, and PyTorch
- Thanks to all contributors and the open-source community