We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.
We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.
We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.
We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.
This API parses human faces in the image input, and performs in-depth analysis of different facial regions. There are 16 facial categories analyzed in total.
Face parsing analyzes the surface composition of the human head (including the face), to obtain insights on features. This API is mainly used to parse the human face in an input image, and provide facial area parsing results, based on 16 categories: hair, the background, facial skin, left eyebrow, right eyebrow, left eye, right eye, nose, upper lip, mouth interior, lower lip, left ear, right ear, neck, glasses, and sunglasses.
This API accurately parses 16 facial region categories, and can be applied in functions such as facial beautification, makeup testing, and facial expression recognition.
Facial beautification
This function implements targeted beautification, based on the location of facial features.
Facial expression recognition
Recognizes facial expressions, based on the features of the five sense organs.
Description
Request
Copy
FaceParsing faceParsing = new FaceParsing(mContext); Frame frame = new Frame(); frame.setBitmap(mBitmap); ImageResult result = faceParsing.doFaceParsing(frame, null); Bitmap newbmp = result.getBitmap();
Response
Copy
{ "resultCode":0 }
Start development here with Huawei
Service introduction
Service overview, application scenarios, and functions
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.