TengineKit, developed by OPEN AI LAB.
TengineKit is an easy-to-integrate face detection and face landmarks SDK. At present, it can run on various mobile phones at very low latency.
- Apk can be directly downloaded and installed on the phone to see the effect.
or
- scan code to download apk
- Provide best performance in mobile client
- Provide the simplest API in mobile client
- Provide the smallest package in mobile client
- face detection
- face landmarks
- face attributes like age, gender, smile, glasses
CPU | Time consuming | Frame rate |
---|---|---|
Kirin 980 | 14ms | 71fps |
Qualcomm 855 | 15ms | 67fps |
Kirin 970 | 17ms | 59fps |
Qualcomm 835 | 18ms | 56fps |
Kirin 710F | 19ms | 53fps |
Qualcomm 439 | 26ms | 38fps |
MediaTek Helio P60 | 27ms | 37fps |
Qualcomm 450B | 28ms | 36fps |
The build.gradle
in Project add
repositories {
...
jcenter()
mavenCentral()
...
}
allprojects {
repositories {
...
jcenter()
mavenCentral()
...
}
}
The build.gradle
in Main Module add
dependencies {
...
implementation 'com.tengine.android:tenginekit:1.0.5'
...
}
Android
- Min Sdk Version 19
When using sdk, you can refer to face api to complete the functions you need.
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
Android code under the "sample/Android" folder.
In setRotation of TengineKit Api, there are two parameters ori and is_screen_rotate, which are the rotation angle and whether to follow the screen rotation. Whether the android:screenOrientation parameter in the Manifest follows the screen can be set. Not setting this parameter is to follow the screen rotation.
This part is to get data from Camera, as the SDK input.
We use the vertical screen as an angle of 0 degrees. Since the data collected by the Android camera always deviates by 90, it is necessary to set + (-90) when setting the ori parameter. The actual rotation angle of Android is to add a function through the sensor Calculate to get. For details, see the example in the Demo project.
When rendering, it is rendered at an angle of 0°, which is the normal output that people see under normal circumstances. The Android part has Canvas and Opengl rendering. Using Opengl rendering can make your apk better.
About the use of TengineKit and face-related technical exchanges, you can join the following QQ groups(Group Answer:TengineKit):
- TengineKit communication QQ group: 630836519
- Scan to join group
ImageHandle to do Zoom, rotate, crop, and change picture format