修复人脸识别问题,更换facerknn,修复崩溃
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:19:32 +08:00
parent 5707e9f2e7
commit 43147788f3

View File

@ -401,6 +401,17 @@ 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];