Filter results by

Face/Identity Detection

Family security is a common concern. In this project, we introduce a security system prototype for ARTIK boards using the Kairos face recognition service. While adaptable for use with other ARTIK Linux-based modules, here we provide specific instructions regarding the ARTIK "Eagleye" board, Leopard MIPI camera, and Grove Pi+ accessories.

For this project, pressing the entry button triggers the system to take a photo of the person’s face. The encoded picture is posted to the Kairos face recognition cloud service and checked against previously uploaded faces of the family. When the Kairos service returns its results, they are interpreted as follows.

  • Success – family member

  • Fail – not a family member

  • No face detected – need to take another picture.

Our demonstration board setup, in a Raspberry Pi form-factor enclosure, is shown.


  1. Sign up for and test out the Kairos tools and API.

    » Kairos facial recognition tutorial

  2. Obtain the following (or comparable) hardware.

    • Eagleye-530s uses a Raspberry Pi form factor and has an ARTIK 530s gateway module as the heart of the system.

    • Leopard OV5640 MIPI camera mates with the Eagleye board.

    • Grove Pi+ shield kit includes the accessories shown below.

      – Button – triggers the camera

      – Buzzer – gives out the alerts

      – Red LED – blinks when a stranger comes in

      – Green LED – blinks when a family member comes in

    All components are readily available at local electronics stores or online.

Hardware Setup

Here we'll connect the hardware using the cables provided (no soldering needed). 

  1. If you want to use USB as the Eagleye power supply, set the jumper to the 'usb' position; to use a 5V wall adapter, put it in the 'DC' position.

  2. Attach the Leopard OV5640 camera module to the front side of Eagleye board.

  3. Using the wires in the Grove Pi+ kit, connect the LEDs, button, and buzzer modules to the shield. 

    Here we'll use:

    Button D4
    Buzzer D8
    Red LED D3
    Green LED D7

    You could use different digital ports if you want; these were chosen for ease of wiring and component layout.

  4. Attach the shield firmly to the Eagleye board.

  5. Connect the USB cable to your development system USB port

System Startup

  1. Open your terminal emulator (PuTTY, ARTIK IDE, or other).

  2. Carefully press the power button of the Eagleye board.

    When you attach the shield to Eagleye, the power button is not easy to access. You may want to wire across the switch to allow for automatic start-up when power is applied.

Software Setup

Seeed provides c++ libraries for the Grove Pi+ kit that we will use here. Do not use Python or run ‘’ – the project has a dependency on Raspberry Pi and the installation will fail on an ARTIK board.

  1. Download the files from github.

    git clone

  2. Install these packages.
    apt install g++ libi2c-dev

  3. While you don't need to use I2C on the Grove Pi+ shield, you must still install I2C drivers for the GrovePi code to run.
     » Install I2C drivers

  4. Copy face_rec.cpp to a file of the same name on your ARTIK board. It will be the main program of the project. The flow is as follows.

    1. The loop detects the button pressed and triggers the camera.

    2. The Python code sends the recognition request with the encoded picture to the Kairos platform using the program you set up in the tutorial.

    3. After the recognition is done, a json format response is returned.

    4. A parser checks the result and saves it to a .txt file.

    5. The corresponding LED and buzzer sound will be triggered.

  5. Compile face_rec.cpp like this:

    g++ -Wall grovepi.cpp face_rec.cpp -o face_rec

Running the System

Start your main program as follows.


Now, whenever you push the button, the system will take a picture and check it.

Remember that you can add new family members at any time by running

We'll leave it as an exercise for you to improve the code to allow you to enroll new family members by a button-push. You may even decide to connect the board to a door latch to unlock the door only when a family member is detected.

Last updated on: