This is the Rooster server-side code for facial recogntion and verification. This code will be deployed onto a cloud based server. This server is designed to provide efficient real-time matching capabilities. This server is designed to receive multiple image frames from a security camera and process those frames by looking for faces that match those in the Rooster database.
Before running this server, ensure you have the following dependencies installed:
- Python
- Required Python packages (listed in
requirements.txt
)
-
Clone this repository to your local machine:
git config credential.helper store git clone https://github.com/Rooster-AI/FaceMatchServer.git
(python-env) -m unittest discover -s test
-
Build the docker image
- from the Rooster/FaceMatchServer dir run
docker build -t rooster-server .
-
(opt. 1)Run the docker image
docker run -d -p 5000:5000 --restart always rooster-server
-
(opt. 2)Run a script that will restart docker image and run git pull nightly at 3am (set timezone -
sudo timedatectl set-timezone America/Denver
) a. make restart_docker.sh executablechmod +x restart_docker.sh
b. add to crontab
crontab -e
c. add a new line to that file and save file
0 3 * * * /path/to/restart_docker.sh
d. verify scheduled task
crontab -l
- headers: application/json
- body:
{
"images":["",""],
"device_id": "string"
}
- headers: application/json
- body:
{
"full_name": "",
"drivers_license": "",
"est_value_stolen": "",
"reporting_store_id": "",
"is_private": "",
"description": "",
"image_encoding":""
}
- URL params are optional, those are the defaults
- If the server has not compiled with that model and backend, will return an errror
- Returns:
- a .pkl file as as attachment containing the latest encoded database of faces
- /upload-images add store id to get the raspberry pi it was coming from