修复人脸识别问题,更换facerknn,修复崩溃2
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-08 15:27:18 +08:00
parent 6d9b22517f
commit f61b9d4c99
3 changed files with 0 additions and 13 deletions

Binary file not shown.

View File

@ -897,9 +897,7 @@ private:
in.type = RKNN_TENSOR_UINT8;
}
std::cerr << "[ai_face_recog] DEBUG: before InferBorrowed, in.size=" << in.size << " in.type=" << in.type << "\n";
auto r = AiScheduler::Instance().InferBorrowed(model_handle_, in);
std::cerr << "[ai_face_recog] DEBUG: after InferBorrowed, success=" << r.success << "\n";
if (!r.success || r.outputs.empty()) {
std::cerr << "[ai_face_recog] inference failed: " << (r.error.empty() ? "unknown" : r.error) << "\n";
continue;

View File

@ -401,17 +401,6 @@ AiScheduler::BorrowedInferResult AiScheduler::InferBorrowed(ModelHandle handle,
return result;
}
// DEBUG: 检查输出大小是否超出预分配 buffer
for (uint32_t i = 0; i < ctx->n_output; ++i) {
size_t prealloc_sz = ctx->output_buffers[i].size();
size_t actual_sz = outputs[i].size;
std::cerr << "[AiScheduler] output[" << i << "] prealloc=" << prealloc_sz
<< " actual=" << actual_sz << " type=" << ctx->output_attrs[i].type << "\n";
if (actual_sz > prealloc_sz && prealloc_sz > 0) {
std::cerr << "[AiScheduler] ERROR: output size exceeds preallocated buffer!\n";
}
}
result.outputs.resize(ctx->n_output);
for (uint32_t i = 0; i < ctx->n_output; ++i) {
auto& out = result.outputs[i];