修复人脸检测,o4.5 3
Some checks are pending
CI / host-build (push) Waiting to run
CI / rk3588-cross-build (push) Waiting to run

This commit is contained in:
sladro 2026-01-07 19:40:26 +08:00
parent d55356b5ef
commit 40b929d9d5

View File

@ -616,6 +616,21 @@ private:
int orig_w, int orig_h,
int in_w, int in_h,
FaceDetResult& out) {
// Debug: log output tensor info once
static bool dbg_outs_logged = false;
if (!dbg_outs_logged) {
dbg_outs_logged = true;
LogInfo("[ai_face_det] DecodeRetinaFace: num_outputs=" + std::to_string(outs.size()));
for (size_t i = 0; i < outs.size(); ++i) {
std::string dims_str;
for (auto d : outs[i].dims) dims_str += std::to_string(d) + ",";
LogInfo("[ai_face_det] out[" + std::to_string(i) + "] size=" + std::to_string(outs[i].size) +
" dims=[" + dims_str + "]" +
" zp=" + std::to_string(outs[i].zp) +
" scale=" + std::to_string(outs[i].scale));
}
}
// Find loc/conf/landms tensors.
std::vector<NcTensor> locs;
std::vector<NcTensor> confs;
@ -639,6 +654,14 @@ private:
continue;
}
}
// Debug: log extracted tensor counts
if (!dbg_outs_logged || (locs.empty() || confs.empty())) {
LogWarn("[ai_face_det] extracted: locs=" + std::to_string(locs.size()) +
" confs=" + std::to_string(confs.size()) +
" landms=" + std::to_string(landms.size()));
}
if (locs.empty() || confs.empty()) return;
// Concatenate along N.