Facial Feature Detection

Capability Introduction

Facial feature detection, contour dotting

This API is used to detect the key features on human faces in input images, and return the coordinates of the key points (276 landmark points) that represent the facial contours, providing input for processing for subsequent algorithms for beautification, facial modeling, and facial expression identification.

Beautification, facial expression recognition

This API provides the precise coordinates for key contour points for all five sense organs on a human face, and can be applied in diverse functions, including facial beautification, facial modeling, and facial expression recognition.

Facial beautification

This function implements targeted beautification, based on the location of facial features.

Facial modeling

This function assists in the conversion from a portrait to a 3D character model for photos, based on the positions of key facial features.



FaceLandMarkDetector lm = new FaceLandMarkDetector(mContext);
Frame frame = new Frame();
JSONObject jsonObject = lm.detectLandMark(frame, null);
List<FaceLandmark> landMarks = lm.convertResult(jsonObject);


  "resultCode": 0,
  "landmark": "[{\"positionF\":

Start development here with Huawei

Service introduction

Service overview, application scenarios, and functions
Learn more

Access preparation

Preparation for access, such as registration, authentication, and agreement signing
Learn more

Sample code

Demonstration of sample code
Learn more

API description

Interface parameter definition, description, restrictions, and constraints
Learn more
1Can I call the faceCompare() method without calling the prepare() method of the API?

Yes, you can. The engine is started by default in the faceCompare() method. If the engine has already been started, it will not restart.

2When should I call the release() method?

The release() method will uninstall a model that has been loaded to the NPU chip. If the app is no longer using face detection, uninstall the model in a timely manner to free up resources.