diff --git a/Android/README.md b/Android/README.md index 30cdb63..b0b0eaf 100644 --- a/Android/README.md +++ b/Android/README.md @@ -25,13 +25,13 @@ The ```build.gradle``` in Main Module add,select which function you need.But the dependencies { ... // Must have and must be the newest!!!! - implementation 'com.tengine.tenginekit:core:0.0.3' + implementation 'com.tengine.tenginekit:core:0.0.4' // Function on Face implementation 'com.tengine.tenginekit:face:0.0.3' // Function on Hand implementation 'com.tengine.tenginekit:hand:0.0.2' // Function on Body - implementation 'com.tengine.tenginekit:body:0.0.2' + implementation 'com.tengine.tenginekit:body:0.0.3' ... } ``` diff --git a/Android/docs/Android_README_CN.md b/Android/docs/Android_README_CN.md index ad37823..05984ac 100644 --- a/Android/docs/Android_README_CN.md +++ b/Android/docs/Android_README_CN.md @@ -23,13 +23,13 @@ Project中的build.gradle添加 dependencies { ... // 必须有,并且必须是最新的 - implementation 'com.tengine.tenginekit:core:0.0.2' + implementation 'com.tengine.tenginekit:core:0.0.4' // Function on Face - implementation 'com.tengine.tenginekit:face:0.0.2' + implementation 'com.tengine.tenginekit:face:0.0.3' // Function on Hand - implementation 'com.tengine.tenginekit:hand:0.0.1' + implementation 'com.tengine.tenginekit:hand:0.0.2' // Function on Body - implementation 'com.tengine.tenginekit:body:0.0.1' + implementation 'com.tengine.tenginekit:body:0.0.3' ... } ``` diff --git a/Android/docs/Android_api.md b/Android/docs/Android_api.md index c31b63f..781c526 100644 --- a/Android/docs/Android_api.md +++ b/Android/docs/Android_api.md @@ -65,6 +65,7 @@ Configuration function (functions are based on image detection): BlazeFace, FaceMesh, Iris, + BodyDetect BlazePose, BlazePoseLandmark, HandDetect, @@ -79,12 +80,15 @@ Configuration function (functions are based on image detection): | BlazeFace | Face detect | | FaceMesh | Face 3d landmarks(468) | | Iris | Iris landmarks | +| BodyDetect | Body detect | | BlazePose | Body detect | | BlazePoseLandmark | Body landmarks | | HandDetect | Hand detect | | HandLandmark3d | Hand landmarks | -Tips:BlazeFace, FaceMesh, Iris, BlazePose, BlazePoseLandmark, HandDetect, HandLandmark3d, models are from Google,The project address is:https://github.com/google/mediapipe +Tips: + - BlazeFace, FaceMesh, Iris, BlazePose, BlazePoseLandmark, HandDetect, HandLandmark3d, models are from Google,The project address is:https://github.com/google/mediapipe + - If you want to use body landmark , please use ```BlazePose``` as body detect. ## get face detect infos Since all functions on face are based on face detection, first create an object of ```Face.FaceDetect```. Detect detection will be faster, BlazeFace will be more accurate and the angle can be larger , but it didn`t support much faces(BlazeFace is based on the Google model). Will eventually return a [FaceDetectInfo list](#FaceDetectInfo); diff --git a/Android/docs/Android_api_CN.md b/Android/docs/Android_api_CN.md index a16b3be..228c082 100644 --- a/Android/docs/Android_api_CN.md +++ b/Android/docs/Android_api_CN.md @@ -65,6 +65,7 @@ BlazeFace, FaceMesh, Iris, + BodyDetect, BlazePose, BlazePoseLandmark, HandDetect, @@ -79,12 +80,15 @@ | BlazeFace | 人脸检测 | | FaceMesh | 人脸3d关键点(468) | | Iris | 虹膜关键点 | +| BodyDetect | 身体检测 | | BlazePose | 身体检测 | | BlazePoseLandmark | 身体关键点 | | HandDetect | 手部检测 | | HandLandmark3d | 手部关键点 | -Tips:BlazeFace, FaceMesh, Iris, BlazePose, BlazePoseLandmark, HandDetect, HandLandmark3d,的模型都是来自Google,项目地址为:https://github.com/google/mediapipe +Tips: + - BlazeFace, FaceMesh, Iris, BlazePose, BlazePoseLandmark, HandDetect, HandLandmark3d,的模型都是来自Google,项目地址为:https://github.com/google/mediapipe + - 如果你想使用身体关键点,请使用```BlazePose```作为身体检测方式。 ## 获取人脸检测信息 由于脸部所有功能都基于人脸检测,所以先创建一个```Face.FaceDetect```的对象。Detect检测会更快,BlazeFace更准确,支持角度更大但是不支持多脸(BlazeFace是基于Google模型的)。最终会返回一个[List](#FaceDetectInfo); diff --git a/Android/sample/FaceDemo/app/build.gradle b/Android/sample/FaceDemo/app/build.gradle index d96cf1c..2f1493e 100644 --- a/Android/sample/FaceDemo/app/build.gradle +++ b/Android/sample/FaceDemo/app/build.gradle @@ -50,7 +50,7 @@ dependencies { implementation 'com.makeramen:roundedimageview:2.3.0' implementation 'com.google.android.material:material:1.0.0' - implementation 'com.tengine.tenginekit:core:0.0.3' + implementation 'com.tengine.tenginekit:core:0.0.4' implementation 'com.tengine.tenginekit:face:0.0.3' implementation 'com.android.support:appcompat-v7:28.0.0' diff --git a/Android/sample/GoogleBodyDemo/app/build.gradle b/Android/sample/GoogleBodyDemo/app/build.gradle index d557ada..c25ec65 100644 --- a/Android/sample/GoogleBodyDemo/app/build.gradle +++ b/Android/sample/GoogleBodyDemo/app/build.gradle @@ -50,8 +50,8 @@ dependencies { implementation 'com.makeramen:roundedimageview:2.3.0' implementation 'com.google.android.material:material:1.0.0' - implementation 'com.tengine.tenginekit:core:0.0.3' - implementation 'com.tengine.tenginekit:body:0.0.2' + implementation 'com.tengine.tenginekit:core:0.0.4' + implementation 'com.tengine.tenginekit:body:0.0.3' implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0' diff --git a/Android/sample/GoogleFaceDemo/.idea/vcs.xml b/Android/sample/GoogleFaceDemo/.idea/vcs.xml index b2bdec2..def3818 100644 --- a/Android/sample/GoogleFaceDemo/.idea/vcs.xml +++ b/Android/sample/GoogleFaceDemo/.idea/vcs.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/Android/sample/GoogleFaceDemo/app/build.gradle b/Android/sample/GoogleFaceDemo/app/build.gradle index d96cf1c..2f1493e 100644 --- a/Android/sample/GoogleFaceDemo/app/build.gradle +++ b/Android/sample/GoogleFaceDemo/app/build.gradle @@ -50,7 +50,7 @@ dependencies { implementation 'com.makeramen:roundedimageview:2.3.0' implementation 'com.google.android.material:material:1.0.0' - implementation 'com.tengine.tenginekit:core:0.0.3' + implementation 'com.tengine.tenginekit:core:0.0.4' implementation 'com.tengine.tenginekit:face:0.0.3' implementation 'com.android.support:appcompat-v7:28.0.0' diff --git a/Android/sample/GoogleHandDemo/app/build.gradle b/Android/sample/GoogleHandDemo/app/build.gradle index c59244b..795dac5 100644 --- a/Android/sample/GoogleHandDemo/app/build.gradle +++ b/Android/sample/GoogleHandDemo/app/build.gradle @@ -50,7 +50,7 @@ dependencies { implementation 'com.makeramen:roundedimageview:2.3.0' implementation 'com.google.android.material:material:1.0.0' - implementation 'com.tengine.tenginekit:core:0.0.3' + implementation 'com.tengine.tenginekit:core:0.0.4' implementation 'com.tengine.tenginekit:hand:0.0.2' implementation 'com.android.support:appcompat-v7:28.0.0' diff --git a/Android/sample/ImageDemo/app/build.gradle b/Android/sample/ImageDemo/app/build.gradle index d357bc9..e9702a8 100644 --- a/Android/sample/ImageDemo/app/build.gradle +++ b/Android/sample/ImageDemo/app/build.gradle @@ -50,7 +50,7 @@ dependencies { implementation 'com.makeramen:roundedimageview:2.3.0' implementation 'com.google.android.material:material:1.0.0' - implementation 'com.tengine.tenginekit:core:0.0.3' + implementation 'com.tengine.tenginekit:core:0.0.4' implementation 'com.tengine.tenginekit:face:0.0.3' implementation 'com.android.support:appcompat-v7:28.0.0' diff --git a/Linux/include/tenginekit_api.h b/Linux/include/tenginekit_api.h index f9d5366..431c6a6 100644 --- a/Linux/include/tenginekit_api.h +++ b/Linux/include/tenginekit_api.h @@ -25,7 +25,8 @@ enum ModelType{ Landmark3d, GoDetect, Iris, - BlazePose, + BodyDetect, + BlazePoseDetect, BlazePoseLandmark, HandDetect, HandLandmark3d, @@ -48,11 +49,15 @@ typedef struct FaceSDKConfig FaceSDKMode mode; int thread_num; + char* packageName; + char* uuid; } FaceSDKConfig; void facesdk_init(FaceSDKConfig config); void facesdk_readModelFromFile(ModelType type, const char* model_path, ImageFormat modelInputFormat); +void facesdk_readModelFromFile(ModelType type, const char* model_path, ImageFormat modelInputFormat, bool is_encrypted); +void facesdk_readModelFromBuffer(ModelType type, char* buffer,int buffer_size, ImageFormat modelInputFormat, bool is_encrypted); void facesdk_release(); sdkFaces facesdk_detect(char *imgData); @@ -67,6 +72,9 @@ sdkBody facesdk_bodylandmark(); sdkHand3d facesdk_handdetect(char *imageData); sdkHand3d facesdk_handlandmark3d(); +void facesdk_set_mode(FaceSDKMode mode); +void facesdk_set_orientation(int degree, bool screen_rotation, int screen_w, int screen_h); + void facesdk_create_handler(ImageFormat image_input_format, ImageFormat image_output_format); char* facesdk_handle_image(char* imageData, int image_w, int image_h, int input_x1, int input_y1, int input_x2, int input_y2, int output_w, int output_h, int rotation, bool mirror); diff --git a/Linux/include/tenginekit_struct.h b/Linux/include/tenginekit_struct.h index e164fb1..9c291db 100644 --- a/Linux/include/tenginekit_struct.h +++ b/Linux/include/tenginekit_struct.h @@ -1,4 +1,5 @@ - +#ifndef TENGINEKIT_STRUCT +#define TENGINEKIT_STRUCT //--------------------base struct ------------------------ typedef struct Box { float x1; @@ -52,8 +53,9 @@ typedef struct FaceInfo3d { typedef struct BodyInfo { Box body_box; + float score; float landmark[25 * 4]; -}; +} BodyInfo; typedef struct HandInfo3d { @@ -89,3 +91,4 @@ typedef struct sdkHand3d //-------------------------------------------------------- +#endif \ No newline at end of file diff --git a/Linux/libs/libTengineKitSDK.so b/Linux/libs/libTengineKitSDK.so index 9e8cbc4..b071796 100644 Binary files a/Linux/libs/libTengineKitSDK.so and b/Linux/libs/libTengineKitSDK.so differ diff --git a/README.md b/README.md index 10649f6..40d9495 100644 --- a/README.md +++ b/README.md @@ -44,19 +44,21 @@ or - face 3dlandmarks - face attributes for example: age, gender, smile, glasses - eye iris & landmarks +- body detect - hand detect(Real-time, not yet on Mobile) - hand landmarks(Real-time, not yet on Mobile) -- body detect(Real-time, not yet on Mobile) +- body detect google(Real-time, not yet on Mobile) - body landamrks(Real-time, not yet on Mobile) -# Update (2021/02/24) -- Update Core v0.0.3 +# Update (2021/02/25) +- Update Core v0.0.4 - Update Face v0.0.3 - Update Hand v0.0.2 -- Update Body v0.0.2 +- Update Body v0.0.3 - Fixed some Bugs - Rename models - Linux libTengineKitSDK.so +- Body Detect model # Performance(Face Detect & Face Landmark)