Face Recognition in Oracle Cloud

Happy New Year! Hope your New Year is filled with success, health, prosperity and happiness.

In the first blog post of 2018, you will learn how to build a simple Face Recognition application and run it using Oracle Cloud.

A facial recognition system is an application capable of identifying people from images or videos. This can be done by comparing facial features of the image with a faces database.

Download the source code here: https://github.com/waslleysouza/face_recognition.

Try my app here: Upload: http://141.144.22.159:5000/ and Recognition: http://141.144.22.159:5000/recognition

To start, create a new Compute Classic instance according this blog post: Creating a compute instance in Oracle Cloud.

Go to Network and create a new Security Application: face_recognition.

Create two new Security Rules: ssh …

… and face_recognition.

Open your terminal and start a new SSH session.
Run the following commands to update Oracle Linux and install some necessary packages.

sudo yum -y update
sudo yum -y groupinstall development
sudo yum -y install cmake wget

Do you know Anaconda Project? Anaconda is the easiest way to do Python data science and machine learning. It includes hundreds of popular data science packages and the conda package and virtual environment manager for Windows, Linux and MacOS. Conda makes it quick and easy to install, run and upgrade complex data science and machine learning environments like scikit-learn, TensorFlow and SciPy.

Install the Anaconda.

wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
bash Anaconda3-5.0.1-Linux-x86_64.sh

Activate the installation.

source ~/.bashrc

Install the Dlib library.

conda install -c conda-forge dlib

Install the Face Recognition library.

pip install face_recognition

Clone the Git repository.

git clone https://github.com/waslleysouza/face_recognition.git

Run app.py.

cd face_recognition/
python app.py

Visit <YOUR_INSTANCE_IP>:5000 to upload some pictures and create a good base with known faces.

And then, visit <YOUR_INSTANCE_IP>:5000/recognition to upload a new picture.

When you click the upload button, the magic happens.

Even when you use an image with 2 or more people.

The magic still happens. =D

Have a good time!

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

2 thoughts on “Face Recognition in Oracle Cloud”

  1. Thank you for excellent blog Waslley, but the direct link for your app does not work.

    Regards,
    Yazan Mohammad

Leave a Reply

Your email address will not be published. Required fields are marked *