Overview

Updated at:

IoT Edge provides facial recognition database service APIs for V series edge integrated devices. These APIs allow you to create, view, delete, and update users, user groups, and device groups. You can also manage the relationships between them.

Facial data synchronization mechanism

IoT Edge synchronizes facial data as follows:

  • A user can join one or more user groups.

  • An edge integrated device can join one or more device groups.

  • You can bind or unbind the facial data synchronization relationship between user groups and device groups.

    Important

    Binding or unbinding the facial data synchronization relationship between user groups and device groups triggers a large amount of data synchronization to the devices. Do not change this relationship frequently.

The following figure shows the facial data synchronization mechanism in a factory facial recognition scenario.

Face synchronization mechanism diagram

In the figure:

  • The facial data of each user in the Management Group is synchronized to every edge integrated device in the Conference Room Device Group, Warehouse Device Group, and Main Gate Device Group (Edge Integrated Device 1, Edge Integrated Device 2).

  • The facial data of each user in the Security Group is synchronized to every edge integrated device in the Warehouse Device Group and Main Gate Device Group (Edge Integrated Device 1, Edge Integrated Device 2).

  • The facial data of each user in the Worker Group is synchronized to every edge integrated device in the Main Gate Device Group (Edge Integrated Device 2).

API call sequence

Add a user

Important

For the following steps:

  • Perform steps 1 to 3 only once for each facial recognition project, such as a factory, school, or office building.

  • Repeat steps 4 and 5 each time you add a user.

  • Call the API in step 6 as needed.

  1. Create a user group and a device group:

  2. Bind the user group to the device group for facial data synchronization: AddFaceUserGroupAndDeviceGroupRelation.

  3. Add a device to the device group: AddFaceDeviceToDeviceGroup.

  4. Add a user: AddFaceUser.

  5. Add the user to the user group: AddFaceUserToUserGroup.

  6. (Optional) Add a facial image for the user: AddFaceUserPicture.

Delete face users

Handle facial data synchronization errors

If the facial recognition database on the cloud is inconsistent with the one on the device, call ClearFaceDeviceDB. This clears the entire database on the edge integrated device and triggers a full resynchronization of facial data.

Important

Resynchronizing facial data can take a long time depending on network conditions and other environmental factors. Do not call ClearFaceDeviceDB frequently.