mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[Android] Add PP-OCRv3 int8 docs and fix NULL cls result error (#762)
* [Android] Update ppseg jni via new api and optimize jni vis funcs * delete local refs * [Android] Add PPTinyPose jni and java api * [Android] Update gradle download tasks info * [Android] Add PPTinyPose Android app example * update app build.gradle * [Android] Add PP-OCRv3 int8 docs and fix NULL cls result error
This commit is contained in:
@@ -842,9 +842,12 @@ bool AllocateOCRResultFromJava(
|
||||
return false;
|
||||
}
|
||||
|
||||
const int cls_len = env->GetArrayLength(j_ocr_cls_scores_float_arr);
|
||||
if (cls_len != env->GetArrayLength(j_ocr_cls_labels_int_arr)) {
|
||||
return false;
|
||||
int cls_len = 0;
|
||||
if ((j_ocr_cls_labels_int_arr != NULL) && (j_ocr_cls_scores_float_arr != NULL)) {
|
||||
cls_len = env->GetArrayLength(j_ocr_cls_scores_float_arr);
|
||||
if (cls_len != env->GetArrayLength(j_ocr_cls_labels_int_arr)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Init cxx result
|
||||
|
Reference in New Issue
Block a user