[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:
DefTruth
2022-12-01 11:16:40 +08:00
committed by GitHub
parent 9afb4d4296
commit 63f60aa35c
4 changed files with 31 additions and 8 deletions

View File

@@ -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