Introduction to HiAI Engine

Burak iren
Huawei Developers
Published in
5 min readNov 23, 2020

Hi friends, today we will introduce to Huawei Artificial Intelligence which is developed by Huawei. But, before the HiAI Engine explains, we should talk about the Artificial Intelligence.

What is Artificial Intelligence (AI)?

Artificial intelligence (AI), is intelligence demonstrated by machines, unlike the natural intelligence displayed by humans and animals and refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions.

  • The goals of artificial intelligence include learning, reasoning, and perception.
  • AI is being used across different industries including finance and healthcare.

What is Huawei HiAI ?

HiAI is Huawei’s AI computing platform. HUAWEI HiAI is a mobile terminal–oriented artificial intelligence (AI) computing platform that constructs three layers of ecology: service capability openness, application capability openness, and chip capability openness. The three-layer open platform that integrates terminals, chips, and the cloud brings more extraordinary experience for users and developers. These 3-layer open capabilities are;

  • HUAWEI HiAI Foundation(Chipset) : Accelerates the transformation and migration of existing models, and optimizes chipset performance through heterogeneous scheduling and NPU acceleration. Achieve optimal energy efficiency and breakthrough performance.
  • HUAWEI HiAI Engine (Device) : Integrates various AI capabilities into apps, making apps more intelligent and powerful.
  • HUAWEI HiAI Service (Cloud) : A fertile ground for smart all scenario digital services. Service capabilities — connecting users with your services.

Today we will focus more on HiAI Engine.

What is HUAWEI HiAI Engine?

HUAWEI HiAI Engine opens application capabilities, and easily integrates a plurality of AI capabilities and Apps, making the Apps more intelligent and powerful.

The open application capabilities are as follows:

  • Computer Vision (CV) Engine : CV is the capabilities by which computers simulate the human visual system to sense the ambient environment, and determine, recognize, and understand the composition of space. The capabilities include image super resolution, facial recognition, and object recognition.
  • Automatic Speech Recognition (ASR) Engine : ASR converts human voice into text, to facilitate further parsing and understanding by computers. The capabilities include speech recognition, speech conversion, and text-to-speech (TTS). (Just open for China yet)
  • Natural Language Understanding (NLU) Engine : NLU is combined with the ASR engine, to enable Apps to understand human voice or text, thereby performing communication or natural actions. The capabilities include word segmentation, text entity recognition, emotive tendency analysis, and machine translation. (Just open for China yet)

The features of the HiAI Engine are:

  • Scene Detection : Scene detection can quickly classify images by identifying the type of scene to which image content belongs, including animals, green plants, food, buildings, and automobiles. Scene detection can also add smart classification labels to images, facilitating smart album generation and image category management.
  • Document Converter : Document converter enables apps to convert document images into electronic documents conveniently, such as PPT files. It can recognize documents and the texts in images, and return the recognized content to the client, which will restore the results into a PPT file.
  • Face Detection : Face detection detects human faces in images, and maps the faces according to a high-precision rectangular grid. It can be used as the key module for screen unlocking or locking apps, as well as a wide range of scenarios that require facial recognition. Specific locations on a human face can be beautified, based on their positioning relative to key facial features. This API can be applied in features such as face unlock, face clustering, and facial beautification.
  • Facial Comparison: Facial comparison recognizes and extracts key facial features, performs high-precision comparisons of human faces, provides confidence scores, and determines whether the same person appears across different images. Cutting-edge facial comparison technology intelligently categorizes and manages photos. An intelligent image recognition algorithm ensures accurate facial recognition, and enables apps to provide an enhanced user experience.
  • Body Pose Estimation : The key skeletal features are important for describing human posture and predicting human behavior. Therefore, the recognition of key skeletal features is the basis for a diversity of computer vision tasks, such as motion categorizations, abnormal behavior detection, and auto-navigation. In recent years, improved skeletal feature recognition has been widely applied to the development of deep learning technology, especially domains relating to computer vision.

Pose estimation mainly detects key human body features such as joints and facial features, and provides skeletal information based on such features.

  • Code Recognation : Code recognition identifies the QR codes and bar codes to obtain the contained information, based on which the service framework is provided.

This API can be used to parse QR codes and bar codes in 11 scenarios including Wi-Fi and SMS. It provides effective code detection and result-based service provision capabilities.

Example Codes For Face Comparision

Before the beginning development, you have to add huawei-hiai-asr.aar and huawei-hiai-vision.aar libraries to you project.

Run the following commands to add the classes related to facial comparison to the project.

Perform initialization by using the VisionBase static class, to asynchronously obtain a connection to the service.

Define a facial comparison instance, and use the context of this project as the input parameter. Then, define VisionImage and transfer the Bitmap image to be detected. Create FaceCompareConfiguration and set the required VisionTextConfiguration. At last, Call faceCompare to obtain the result.

The isSamePerson field in mFaceCompareResult indicates whether the same person is appearing in the photos. True indicates yes, while False indicates not. The score is a floating-point number ranging from 0–1, indicating the confidence score.

Conclusion

I have tried to explain what is HiAi with its features and examples. See you in our other article, bye :)

--

--