-
Clone this project:
$ git clone https://github.com/diogoshibata/face_recognition_api -
Go to face_recognition_api folder:
$ cd face_recognition_api -
Install TensorFlow and cuDNN:
$ chmod +x tensorflow-install.sh
$ ./tensorflow-install.sh
For cuDNN, look at Step 5 of Dmitriy Kisil's post: https://medium.com/better-programming/install-tensorflow-1-13-on-ubuntu-18-04-with-gpu-support-239b36d29070 -
Install the application:
-
If you have CPU:
$ chmod +x install-app-cpu.sh
$ ./install-app-cpu.sh -
If you have GPU:
$ chmod +x install-app-gpu.sh
$ ./install-app-gpu.sh
-
-
Start the application:
$ chmod +x start-app.sh
$ ./start-app.sh -
Open your browser and access the Console:
http://<HOST_IP>:5000/ui
It is possible to download or upload all your images to Oracle Cloud Infrastructure Object Storage.
-
Open the deployment.json file and change the following parameter:
- "OCI_STORAGE_SYNC": true
-
Update the conf/config.prod file with your Oracle Cloud Account information.
-
Generate public and private API keys.
cd ~/face_recognition_api/conf
openssl genrsa -out ~/face_recognition_api/conf/oci_api_key_private.pem 2048
chmod go-rwx ~/face_recognition_api/conf/oci_api_key_private.pem
openssl rsa -pubout -in ~/face_recognition_api/conf/oci_api_key_private.pem -out ~/face_recognition_api/conf/oci_api_key_public.pem
cat ~/face_recognition_api/conf/oci_api_key_public.pem
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo/7hKYCiExQJjo3C4M+V
QVgBowAUYRRRCEIkkfolpYSlHuyfl0Y34OuYlat6mqnZReuSl6MKa2e8PKIHfa4T
0s/01cWvgETYnFty6lskNQO3eGO1KIQ5rZCSuCgcrnWNUzYKQ+0FopSDHj1BPzbv
9Kr13cE9BRU7nBYyG4hGbjUmY9qt6LUKR/MzZZjI5+IAlwpywlYN7X2uwUf30K/c
M/zUpgSZNNiI9lwnJB679pAOHBGdK0JfXEDS6VUAITgzHbNQcFcl6567LCd4U15j
1DjWAEWIObtYvzpX0nqUsn8Is8GoS6eTQBes8Nhf+rUgLSodsP8rGBboWtkDfRBk
9wIDAQAB
-----END PUBLIC KEY-----
- Copy the Public Key output and paste it under Identity > Users > User Details > API Keys.
-
/face/add: This operation adds a new human face to the Face Recognition API database. You can upload videos or images that contain only one person.
-
/face/classify: This opertaion to execute a face recognition. You can upload images that contains only one person.
-
/face/train: This operation trains the model to recognize the new faces added by the "/face/add" operation.
-
/face/restart: This operation reloads the Face Recognition API model if you experience any problems.