Face Detection - Face Recognition Api Development- HUAWEI Developer
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 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, including face unlock, face clustering, and facial beautification. Specific locations on a human face can be beautified, based on their positioning relative to key facial features.
Scenarios
Similarity comparison, identity authentication
This API detects human faces based on a grid-based system, and can be applied in features such as face unlock, face clustering, and facial beautification.
Face unlock
This function can be used as the key module for implementing app and screen locking or unlocking functions.
Face Clustering and Retouching
Extracts the key features of human faces for portrait classification in the album and deep face beautification.
Description
Request
Copy
FaceDetector faceDetector = new FaceDetector(this); Frame frame = new Frame(); frame.setBitmap(bitmap); JSONObject jsonObject = faceDetector.detect(frame,null);
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.